Yngvar

TD Sequential (Setup and Countdown)

There are several variations on the classic TD Sequential indicator already published so why do another one would be a fair question to ask. Personally i wasn't fully satisfied with how many of them were implemented so i decided to code my own version from the ground up guided by the rules outlined in Jason Perl's: DeMark Indicators book. Thanks to /u/glaz and /u/andyhitchman for their code that helped me start in the right direction.

Some of the potential improvements were:

Properly implemented setup trend lines
- they now represent the extreme of the beginning of the setup instead of the end

Visual clarity
- arrows appear only on setup nines and countdown thirteens
- indicator features clean simple numbers that (mostly) shrink when zoomed out

Proper and mostly complete countdown recycle and cancellation rules
- countdown is completed only when bar 13 is more extreme than bar 8, until that happens a plus sign (+) appears where 13 should have been
- countdown is cancelled if a setup is completed in the opposite direction, or the price trades through the relevant setup trend line with it's whole bar
- countdown is recycled (begins anew) if the price generates a new setup in the same direction that is greater than the previous one, but less than 1.618 it's size, or if that new setup pierces through the previous setup's true range on a closing basis

Customization
- By default setup initiation requires a price flip but if you like you can disable that requirement and recycle the setup after a nine
- You can now choose to track only buy or only sell setups or disable setups entirely
- You can display only completed nines while the rest are not showing
- Turn off or on support and/or resistance lines
- Turn off or on display of buy and/or sell countdowns
- More to come...

I coded the indicator with readability in mind hoping to make correcting and improving it easier so we can make the best Sequential indicator on TV. Efficiency wasn't too big a concern. Work is in progress and I'm planning to add more features.

Please PM me or comment below all your suggestions and requests, and especially the bugs if you find some.
Apr 26
Release Notes: Added risk lines for the countdown part. Still not sure where to cut them off when the market goes in your favor so they can get extended really long, will fix.
Ta bort från favoritskript Lägg till som favoritskript
@Yngvar , if you are actively supporting this excellent script of yours, I have few bugs to report. Will report them once I receive your reply. I am an avid Demark follower, with fair understanding of the subject but no knowledge of pine script. Thanks for by far the best executed script on TV based on sequential.
Regards
Vivek
+1 Svara
Yngvar vivek_ahuja
@vivek_ahuja, Hey vivek, thank you very much for your comment. I am not actively supporting it but would definitely like to hear your suggestions for improvement. Feel free to message me privately.
Svara
I'm reading through the same book and started improving on some of the existing scripts on TradingView, then I found this. On first glance it seems well done. Will try it out for a while and check it against the book. Thanks!
Svara
Yngvar GravityWave
@rass, Thank you for your comment. I think it's correct up to the point where the instructions in the book felt ambiguous to me, but maybe you can figure out some things out and we can improve it. Keep me posted.
Svara
@Yngvar, Will do! One thing I'm noticing already is the absence of TD setup counts spanning several bars, and I'm not sure I understand why. Any idea? Example:
Svara
GravityWave GravityWave
Oh my bad, it was related to the price flip requirement; great that you put that in there.
Svara
I can see that 9P is the perfection scenario, but what is the difference between the 9 and the 9 with the arrow?
+1 Svara
Yngvar Karlderzzy
@Karlderzzy, Well if i remember correctly every nine should have an arrow for the sake of visual clarity (to make them easier to spot), and the P is there to distinguish setup perfection as you correctly observed.
Svara
I don't think your countdown is working correctly bc the trendline aspect is extending really far. Maybe extend the trendline out to 30 bars max?
Svara
Hem Aktie-screener Forex-screener Krypto-screener Ekonomisk kalender Program Hur det fungerar Diagramfunktioner Priser Ordningsregler Moderatorer Webbsidor och mäklarlösningar Widgets Diagramlösningar Lightweight Charting Library Help Center Refer a friend Funktionsförfrågan Blogg och nyheter Frågor och svar Wiki Twitter
Profil Profilinställningar Konto och fakturering Refer a friend Mina kölappar Help Center Publicerade idéer Följare Följer Privata meddelanden Chatt Logga ut