<p id="isPasted">This could be the one you are looking for:</p><p><a href="https://in.tradingview.com/script/Rd33PlMt-swing-boxes/">Swing Boxes</a></p><p>Swing Boxes is pretty simple indicator, which plots signals with "boxes", that help you determine price targets.</p><p><br style="color: rgb(15, 15, 15); font-family: -apple-system, BlinkMacSystemFont, "Trebuchet MS", Roboto, Ubuntu, sans-serif; font-size: 18px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;"></p><p>What is the idea behind?</p><p>I wanted to make indicator, that could help me make swing trades with nice accuracy (as all we want, lol), and for signal criteria I decided to use highs and lows of the price. Then I started coding some ideas to see which of them could be worthy. And, actually, Swing Boxes appeared to be good. But the thing is, that I didn't intend to build them, they appeared as an anomaly from my code :)</p><p>I started to explore this anomaly (it looked super cool, but was repainting hard) to fix it and I succeeded, now Swing Boxes don't repaint.</p><p>The main idea is that when price goes above it's highest value of p-bars back or below it's lowest value p-bars back, then there is a some god probability, that price will continue to follow current direction.</p><p><br style="color: rgb(15, 15, 15); font-family: -apple-system, BlinkMacSystemFont, "Trebuchet MS", Roboto, Ubuntu, sans-serif; font-size: 18px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;"></p><p>And the things about Swing Boxes is that when there is a good trend movement, the boxes become super small to track price movement and when price breaks out in the counter-trend direction, then you will be able to almost perfectly catch a top or a bottom! But most of the signals won't be so high-quality, so don't think that is this some holy grail to trade swing-trading, because it is not.</p><p><br style="color: rgb(15, 15, 15); font-family: -apple-system, BlinkMacSystemFont, "Trebuchet MS", Roboto, Ubuntu, sans-serif; font-size: 18px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;"></p><p><br style="color: rgb(15, 15, 15); font-family: -apple-system, BlinkMacSystemFont, "Trebuchet MS", Roboto, Ubuntu, sans-serif; font-size: 18px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;"></p><p>Signal logic</p><p><br style="color: rgb(15, 15, 15); font-family: -apple-system, BlinkMacSystemFont, "Trebuchet MS", Roboto, Ubuntu, sans-serif; font-size: 18px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;"></p><p>Quick hint:</p><p>- epsilon(variable e) = ATR * ATR_Factor. It is used to determine box's sensitivity to price changes.</p><ul style="margin: 24px 0px; padding: 0px; list-style-position: outside; list-style-type: "•"; padding-inline-start: 20px; color: rgb(15, 15, 15); font-family: -apple-system, BlinkMacSystemFont, "Trebuchet MS", Roboto, Ubuntu, sans-serif; font-size: 18px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;"><li style="margin: 0px; padding: 0px 0px 0px 10px;">If previous close is higher than variable, which contains previous HIGHEST value (variable h in the code), then update the this variable by taking up-to-date highest value and add epsilon(e) to it;</li><li style="margin: 0px; padding: 0px 0px 0px 10px;">If previous close is lower than variable, which contains previous LOWEST value (variable l in the code), then update the this variable by taking up-to-date lowest value and substract epsilon(e) from it.<br></li></ul><p>Variables decribed above (h and l) are box's top and bottom respectively, so if price cross them, it is logical to update it is value.</p><p>Settings and what is what</p><ul style="margin: 24px 0px; padding: 0px; list-style-position: outside; list-style-type: "•"; padding-inline-start: 20px; color: rgb(15, 15, 15); font-family: -apple-system, BlinkMacSystemFont, "Trebuchet MS", Roboto, Ubuntu, sans-serif; font-size: 18px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;"><li style="margin: 0px; padding: 0px 0px 0px 10px;">Swing Box Period - numbers fo bars in the past to find highest and lowest price from. The bigger the input, the bigger the boxes will be;</li><li style="margin: 0px; padding: 0px 0px 0px 10px;">ATR Period;<br></li><li style="margin: 0px; padding: 0px 0px 0px 10px;">ATR Factor - multiplier for ATR, determines sensitivity for price changes. The bigger this input, the more accurate signals will be, but less the probability that the signal will be on the top or a bottom.</li><li style="margin: 0px; padding: 0px 0px 0px 10px;">Show Boxes? - when chosen, plots box's top and bottom. Used to determine price targets.<br></li><li style="margin: 0px; padding: 0px 0px 0px 10px;">Show Baseline? - when chosen, plot's baseline, which midline between box's top and bottom.</li></ul><p>How to use?</p><p>This indicator plots green and red triangles by default.</p><p>- Green triangle --> Buy;</p><p>- Red triangle --> Sell;</p><p>As I've said before, many signals from indicator will probably be garbage, so you need to tune settings for youself, so it could satisfy you.</p><p>You can enable showing boxes to see box's top and bottom. Box's bottom --> your entry, top --> your profit target.</p><p>If you find a way to sort bad signals, you will be able to trade with super cool RR, because the signal from Swing Boxes appear to be a good one, there is almost 95% probability, that price will not even come close to your stop loss, so you can trade with super small stop-losses! Smaller stop-loss --> smaller risk --> smaller loss --> bigger profit, it is that easy.</p><p>Also you can enable baseline to use at as your 1st TP, and box's top/bottom as 2nd TP, closing 25% on TP1 and the rest on TP2 (but that is just mine recommendation, you can use different RM (risk-management), if you want).</p><p>Also you can use baseline as your S/R (Support/Resistance) line, test it out on your charts.</p><p>And please, hear me out: as all other indicators out here on the TradingView, Swing Boxes ARE NOT meant to be traded in solo! Many bad signal can go in a row, so PLEASE find your way to filter out bad signals with other indicators. </p>
<p id="isPasted">This could be the one you are looking for:</p><p><a href="https://in.tradingview.com/script/Rd33PlMt-swing-boxes/">Swing Boxes</a></p><p>Swing Boxes is pretty simple indicator, which plots signals with "boxes", that help you determine price targets.</p><p><br style="color: rgb(15, 15, 15); font-family: -apple-system, BlinkMacSystemFont, "Trebuchet MS", Roboto, Ubuntu, sans-serif; font-size: 18px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;"></p><p>What is the idea behind?</p><p>I wanted to make indicator, that could help me make swing trades with nice accuracy (as all we want, lol), and for signal criteria I decided to use highs and lows of the price. Then I started coding some ideas to see which of them could be worthy. And, actually, Swing Boxes appeared to be good. But the thing is, that I didn't intend to build them, they appeared …</p>