NexusFi: Find Your Edge


Home Menu

 





How can I get this counter to work properly - TD Sequential


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one kaywai with 33 posts (1 thanks)
    2. looks_two decs0057 with 21 posts (2 thanks)
    3. looks_3 cory with 2 posts (0 thanks)
    4. looks_4 esam_jir with 1 posts (1 thanks)
    1. trending_up 51,905 views
    2. thumb_up 4 thanks given
    3. group 4 followers
    1. forum 56 posts
    2. attach_file 37 attachments




 
Search this Thread

How can I get this counter to work properly - TD Sequential

  #21 (permalink)
 decs0057 
Munich, Germany
 
Experience: Intermediate
Platform: NinjaTrader, TWS
Broker: IB, NinjaTrader Brokerage
Trading: ES,NQ,6E
Posts: 71 since Feb 2010
Thanks Given: 15
Thanks Received: 25

hallo kaywai,

one question about start of setup.
To start setup you need price flip ?


Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Trade idea based off three indicators.
Traders Hideout
Strategy stop orders partially filled
EasyLanguage Programming
REcommedations for programming help
Sierra Chart
What broker to use for trading palladium futures
Commodities
ZombieSqueeze
Platforms and Indicators
 
  #22 (permalink)
kaywai
singapore
 
Posts: 131 since Nov 2009
Thanks Given: 11
Thanks Received: 7

yes you do but only for the first setup. if a second successive setup starts, there is no need for the price flip. another thing is this is only for the "buy". the sell is the reverse.

Reply With Quote
  #23 (permalink)
 decs0057 
Munich, Germany
 
Experience: Intermediate
Platform: NinjaTrader, TWS
Broker: IB, NinjaTrader Brokerage
Trading: ES,NQ,6E
Posts: 71 since Feb 2010
Thanks Given: 15
Thanks Received: 25


Attached version with TDSTLine

Attached Files
Elite Membership required to download: TDSequential.zip
Reply With Quote
  #24 (permalink)
kaywai
singapore
 
Posts: 131 since Nov 2009
Thanks Given: 11
Thanks Received: 7

decs0057,

1) I made an error on line 94: Close[0] should read Open[0] in your code. Likewise line 99. same thing.

2) the calculation of the tdst line should take into account the close of the 10 bar too (i.e. the close of the bar before the buy setup 1st count).

3) can you increase the width of the tdst line to 2?

4) your tdst line is not redrawn after 18 consecutive setup counts...needs to be redrawn after every completed setup ( i.e. after every setup 9 count).

5) if you would like to make the tdst line more dynamic, you could have the line drawn as a dashed line tp begin with upon completion of a setup and when the "cancelDraw" condition becomes true, the line changes from a dashed line to a solid line.

Reply With Quote
  #25 (permalink)
 decs0057 
Munich, Germany
 
Experience: Intermediate
Platform: NinjaTrader, TWS
Broker: IB, NinjaTrader Brokerage
Trading: ES,NQ,6E
Posts: 71 since Feb 2010
Thanks Given: 15
Thanks Received: 25

2) I use Close(10) in calculation of TDSTline
tdstBuyLine = Math.Max( tdstBuyLine, Close[0] ); Line 127

One question to price flip.
If a setup is not completed, for the next setup to start in the same direction we need a price flip ?

Reply With Quote
  #26 (permalink)
kaywai
singapore
 
Posts: 131 since Nov 2009
Thanks Given: 11
Thanks Received: 7

If a setup is not completed, it is removed and you will need a price flip to commence a new setup...you already have it because the setup is not completed...

I've attached 2 charts for your comparison. You can see for my tdst line uses the close of the 10th bar as the tdst reference where as your uses the high of the 1st setup count as the reference.

Attached Thumbnails
Click image for larger version

Name:	decs0057.jpg
Views:	239
Size:	58.8 KB
ID:	9258   Click image for larger version

Name:	kaywai.jpg
Views:	233
Size:	57.8 KB
ID:	9259  
Reply With Quote
  #27 (permalink)
kaywai
singapore
 
Posts: 131 since Nov 2009
Thanks Given: 11
Thanks Received: 7

Small matter but I'll let you decide.
do you think you could re-code to have the tdstline from the bar its value was derived? It wouldn't look so awkward like it was arbitrarily drawn. At the same time, to resize the length of the old tdst line to just before the new completed setup commenced.

This is what the tdst lines look like on the chart. Technically the "old" tdst line should be part of the new setup...

Attached Thumbnails
Click image for larger version

Name:	decs0057.jpg
Views:	229
Size:	118.9 KB
ID:	9276  
Reply With Quote
  #28 (permalink)
 decs0057 
Munich, Germany
 
Experience: Intermediate
Platform: NinjaTrader, TWS
Broker: IB, NinjaTrader Brokerage
Trading: ES,NQ,6E
Posts: 71 since Feb 2010
Thanks Given: 15
Thanks Received: 25

Attached new version

One question about perfection test

This requires that the price bars of the 8th or 9th setup count must be less than both the price bars of the 6th and 7th setup count

Which bar value must satisfy requirement (high, low, open, close)

Attached Files
Elite Membership required to download: TDSequential.zip
Reply With Quote
  #29 (permalink)
kaywai
singapore
 
Posts: 131 since Nov 2009
Thanks Given: 11
Thanks Received: 7

for a buy setup, the low of the 8th or 9th must be lower than the 6th and 7th. for sell setup, it's the high.

Reply With Quote
  #30 (permalink)
kaywai
singapore
 
Posts: 131 since Nov 2009
Thanks Given: 11
Thanks Received: 7


re: your latest td sequential code,
1) countdown is not working. at best, it can do one sell countdown and one buy countdown - at the start of the data. so if i had 15 days of data, the is only one countdown on either side at 15 days ago and nothing else after that.
2) intersection is definitely not used anymore. Mr Demark doesnot even refer to it anymore.
3) i recommend you change the setups to a 9 count and use another counter in the background for recycling.
4) sell tdst line stops extending when a buy setup is complete. should not happen. should continue until a new sell setup is completed or canceldraw conditions are met.
5) tdst sameside lines overlapping is not a good idea if you plan to automate your trading. may need to code a redraw if a same side setup is completed
6) canceldraw is stopping one bar earlier for both the tdstbuy and tdstsell lines. you can decide whether you want to adjust it or not. take a look at the attached chart.
7) just want to show you that your code is missing some setups. a is setups i am getting with my code and b is what you are getting.

Attached Thumbnails
Click image for larger version

Name:	decs0057.jpg
Views:	220
Size:	99.6 KB
ID:	9378   Click image for larger version

Name:	a.jpg
Views:	195
Size:	64.2 KB
ID:	9379   Click image for larger version

Name:	b.jpg
Views:	258
Size:	52.8 KB
ID:	9380  
Reply With Quote




Last Updated on December 8, 2010


© 2024 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 - Privacy Policy - Downloads - Top
no new posts