This study draws upper and lower , based on configurable fractal*** reversal detection, calculates slope from the last two upper or lower reversal points, and then extends a dotted line along the same slope...until the next upper (or lower) reversal occurs. If the high (or low) breaks this extension, the dotted line becomes solid to aid visibility. Reversal detection is configurable to use any number of ticks, but probably four to eight will work best.
I made the inclusion of in the reversal logic optional (off by default) and left the existing input found in synapticEx's code intact, albeit with a lower default. With the addition of , I found hindered identification of reversals, although I could try various other filters than the included originally.
I have also left intact the very nice ability to change the period and use the requested period identify reversals, courtesy of synapticEx.
This could be used in a strategy, as the values plotted are actual values that are available to include in logic and do not include knowledge of the future. However, information is not available until the floor of half the number of ticks used in reversal detection (I then offset by that number to line things up visually). Having never heard of it until now, I just Googled the strategy, which looks interesting, so maybe I could see how this could be ported to that.
***As I typed this, I remembered that while making reversal detection configurable, I changed the detection logic simply to look for highest (or lowest) of the desired length of ticks. I don't know whether this is not strictly anymore, but if desired, with a little work, I could make it require consecutive, consistent changes before and after each reversal again.
Here are a few screenshots from hourly ticks, using the "current" (hourly) period, with and without , and playing with the number of points used to identify reversals.
Not using volume
Sejalan dengan semangat TradingView, penulis skrip ini telah mempublikasikannya secara open-source, sehingga para trader dapat memahami dan memverifikasinya. Salut untuk sang penulis! Anda dapat menggunakannya secara gratis, tetapi penggunaan kembali kode ini dalam publikasi diatur oleh Tata Tertib. Anda dapat memfavoritkannya untuk dapat menggunakannya didalam sebuah chart.
With that said, though, I think highs above the top trend extension (green circles that get darker when high is above them) or lows below the bottom trend extension (red circles that get darker when low is below them) could indicate a possible breakout, which of course you may want to verify using other indicators.
Technical note for use in strategies...
potential buy condition would probably include something like this: high>topsExtension
and potential sell: low<bottomsExtension
I added something like that to my first strategy I published (again, this is all "hello_world" level for me right now, since I'm learning), and it improved it on most charts.
So it's high(offset_len)>topsExtension but with square brackets instead of parentheses.