NexusFi: Find Your Edge


Home Menu

 





Demark Indicators part 1 - TD Setup


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one kaywai with 5 posts (1 thanks)
    2. looks_two fluxsmith with 4 posts (5 thanks)
    3. looks_3 javaAl with 3 posts (1 thanks)
    4. looks_4 sharky with 3 posts (3 thanks)
      Best Posters
    1. looks_one cbratton with 2 thanks per post
    2. looks_two fluxsmith with 1.3 thanks per post
    3. looks_3 sharky with 1 thanks per post
    4. looks_4 kaywai with 0.2 thanks per post
    1. trending_up 117,787 views
    2. thumb_up 16 thanks given
    3. group 14 followers
    1. forum 32 posts
    2. attach_file 10 attachments




 
Search this Thread
  #31 (permalink)
 
forgiven's Avatar
 forgiven 
ashville NC
Market Wizard
 
Experience: Intermediate
Platform: nijia trader
Broker: A.M.P. I.Q. ....C.Q.G.
Trading: ym es
Frequency: Every few days
Duration: Days
Posts: 929 since Mar 2012
Thanks Given: 309
Thanks Received: 666

this thread is dead , question has anyone used the indicators are still use them.


Follow me on X Visit my NexusFi Trade Journal Reply With Quote
Thanked by:
  #32 (permalink)
 zoticus 
London, UK
 
Experience: Advanced
Platform: NT8
Broker: APEX - Interactive Brokers (Equities only)
Trading: CL GC ES 6E
Frequency: Daily
Duration: Minutes
Posts: 31 since Jul 2012
Thanks Given: 4
Thanks Received: 8


kaywai View Post
Anybody want to have a go at creating a set of Demark indicators for ninjatrader? we could start with TD Setup which is a initial part of TD Combo and TD Sequential.

For a TD Buy Setup, the close of the current bar must be lower than the close of 4 bars ago. A completed TD Buy Setup must have 9 consecutive closes, each one lower than the corresponding close 4 bars earlier. Ideally after every valid count, it prints a number below the corresponding bar.

A TD Sell Setup is the reverse. The close of the current bar must be greater than the close of 4 bars ago, and a completed TD Sell Setup must have 9 consecutive closing bars, each one greater than the corresponding close 4 bars earlier. Ideally after every valid count, it prints a number above the corresponding bar.

If at any point this sequence is interrupted before the completion of its 9 count, the sequence is cancelled and must begin anew.

Upon the completion of its 9 counts, a look-back over the past 9 bars + the close of the 10th bar is done. For a TD Buy Setup, a line is drawn, commencing from the highest point of those bars in question. This line extends until another TD Buy Setup is completed. For a TD Sell Setup, a line is drawn, commencing from the lowest point of those bars in question. This line extends until another TD Sell Setup is completed. These lines are known as TDST lines and can only be drawn upon completion of a TD Buy/Sell Setup.

Is this enough information to kick-off the creation of this indicator? Upon completion of this part of the indicator, we can move on to the TD Countdown.

Did you get anywhere with this?


Reply With Quote
  #33 (permalink)
 
Fi's Avatar
 Fi 
NexusFi
 


kaywai View Post
Did you get anywhere with this?

@zoticus,

That DeMark TD Setup thread is a classic -- been kicking around since 2009. To my knowledge, nobody's posted a complete working implementation on NexusFi yet. The TD Sequential and Countdown are notoriously tricky to code because of the countdown phase requirements and the recursive counting logic.

The good news: DeMark himself published the rules pretty clearly, and the logic you quoted is accurate. A solid NinjaTrader developer could knock out TD Setup in a few hours -- it's essentially a rolling 9-bar count with the 4-bar lookback. The harder part is the TDST lines (the breakaway lines you mentioned) and handling the setup vs countdown distinction.

If you're serious about getting this built, I'd suggest starting a new thread specifically requesting dev help -- plenty of coders around here who could take a crack at it. The original thread is over 16 years old, might be worth freshening up with a clean request.

Anyone else tackled this? Would love to know if it's floating around somewhere.

-- Fi

"The market has a way of making you prove your convictions before it gives you the payoff."


Learn more about Fi AI trading companion
IMPORTANT: I can make mistakes! Always verify data before relying on it.

Please leave feedback here. You can disable my ability to reply to your posts by placing me on your ignore list.

Fi provides educational information on a best-effort basis only. You are responsible for your own trading decisions and for verification of all data. This message is not trading advice.
Reply With Quote




Last Updated on March 10, 2026


© 2026 NexusFi®, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Downloads - Top
no new posts