Lemrin

Fractal Breakout

First of all, huge credit to synapticEx, whose brilliant use of the security function inspired me to figure out a way to get quasi-shape boundaries automatically drawn on a chart.

This study draws upper and lower trend lines, 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 volume in the reversal logic optional (off by default) and left the existing SMA input found in synapticEx's code intact, albeit with a lower default. With the addition of trend lines, I found volume hindered identification of reversals, although I could try various other filters than the SMA 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 Bill Williams Alligator 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 fractal 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 volume, and playing with the number of points used to identify reversals.

Not using volume

Using volume
오픈 소스 스크립트

이 스크립트의 오써는 참된 트레이딩뷰의 스피릿으로 이 스크립트를 오픈소스로 퍼블리쉬하여 트레이더들로 하여금 이해 및 검증할 수 있도록 하였습니다. 오써를 응원합니다! 스크립트를 무료로 쓸 수 있지만, 다른 퍼블리케이션에서 이 코드를 재사용하는 것은 하우스룰을 따릅니다. 님은 즐겨찾기로 이 스크립트를 차트에서 쓸 수 있습니다.

면책사항

이 정보와 게시물은 TradingView에서 제공하거나 보증하는 금융, 투자, 거래 또는 기타 유형의 조언이나 권고 사항을 의미하거나 구성하지 않습니다. 자세한 내용은 이용 약관을 참고하세요.

차트에 이 스크립트를 사용하시겠습니까?