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

- 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.
Notas de Lançamento: 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.
Script de código aberto

No verdadeiro espírito TradingView, o autor deste script o publicou com código aberto, para que os traders possam compreendê-lo e verificá-lo. Um brinde ao autor! Você pode usá-lo gratuitamente, mas a reutilização deste código em uma publicação é regida pelas Regras da Casa. Você pode favoritá-lo para utilizá-lo em um gráfico.

Quer usar esse script no gráfico?


Are you still polishing/improving this script? I have tested multiple versions and this one ended by being my selected to stay - thank you for it and congrats! :) The clean view of the indicator and customizations offered make it easy to see what/when we can without polluting the chart. Given that scenario, it would be great to see it going further, as the remaining of TD definitions (as combos, aggressive and so on)
+9 Resposta
@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.
+3 Resposta
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.
I can see that 9P is the perfection scenario, but what is the difference between the 9 and the 9 with the arrow?
+2 Resposta
Yngvar derzzycharts
@derzzycharts, 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.
+3 Resposta
Still my favourite TD version!
Would you consider adding a higher timeframe view? i.e. always showing 1h seq for any timeframe under that; always showing 1d seq for any timeframe under that; weekly for daily and so on.
+1 Resposta
Dig the version of TD man! Definitely checkout semiquant's private one if you're looking any additional feature inspiration, it's quite amazing. I used to have access, but lost access to the TV account that was allowed to use it, and now no one can get ahold of semiquant/jdlim to get current access to the locked indicator.... Thanks for the hard work here good sir, cheers!
+1 Resposta
Yngvar MassStash2
@MassStash2, Thanks for your supportive comment, I am glad you like the indicator. I've stopped development on it a long time ago though, but I'll take your suggestion if I come back to it at any point. Cheers!
nice job on script works better than the other four i have tried....more features to come thats awesome
Love u and supports, keep developing