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,799 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

  #31 (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 a new version
I sperated buy and sell in 2 classes TDSeqBuy and TDSeqSell with conditions for valid setup, countdown and other buy,sell specific calculations.

In the output window i print some information for debuging

Now there are 2 paramters
CountOffset = "set setup and countdown counts countOffset percent above high, below low"
RemoveCounts = "remove setup and countdown counts not finished"
please set RemoveCounts = false for checking indicator

Receycling is not implemented yet

Attached Files
Elite Membership required to download: TDSequential.zip
Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Trade idea based off three indicators.
Traders Hideout
Quant vue
Trading Reviews and Vendors
Pivot Indicator like the old SwingTemp by Big Mike
NinjaTrader
ZombieSqueeze
Platforms and Indicators
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
 
  #32 (permalink)
kaywai
singapore
 
Posts: 131 since Nov 2009
Thanks Given: 11
Thanks Received: 7

This is what your latest indicator produced (please see chart). Countdown is still not being displayed. I think the tdst is fine.

I've attached your first version...seems to have a lot more promise there. (please see chart b).

Don't forget that every setup will have a countdown...cancellation and recycling can come later. Perfection can wait too...that is quite simple to program.

Let's try to get the counts right first...

Attached Thumbnails
Click image for larger version

Name:	^NKY  7_2_2009 - 2_26_2010 (Daily).jpg
Views:	244
Size:	93.5 KB
ID:	9730   Click image for larger version

Name:	b.jpg
Views:	221
Size:	87.1 KB
ID:	9731  
Reply With Quote
  #33 (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


I had an error in countdown
Please check this version

You have to set second parameter RemoveCounts = false to see incomplete countdown

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

This is what your code looks like (attached chart a).

1) There are some "funny" counts which occur below the bar mid-Aug to end Sep. Not sure what counts these are. One has 5 counts, another has 6 counts and another has 4 counts.
2) The 18 count setup from mid-July to mid-Aug should give rise to 2 countdowns. we only have 1 countdown.
3) These is a buy setup starting Nov 9. The count stopped at 4....

i ran it thru a 3 minute chart (chart c). Take a look.
not sure why it looks that way...would assume the 13 v 8 and the deferred count for the 13 is not in place...

Attached Thumbnails
Click image for larger version

Name:	a.jpg
Views:	212
Size:	100.2 KB
ID:	9737   Click image for larger version

Name:	c.jpg
Views:	239
Size:	103.9 KB
ID:	9738  
Reply With Quote
  #35 (permalink)
 
cory's Avatar
 cory 
virginia
 
Experience: Intermediate
Platform: ninja
Trading: NQ
Posts: 6,098 since Jun 2009
Thanks Given: 877
Thanks Received: 8,090

just a random though, maybe you should restrict the indicator to just for today, you can either load the chart for just 1 day or do it thru coding


#region Variables
// Wizard generated variables
// User defined variables (add any user defined variables below)
private DateTime currentDate = Cbi.Globals.MinDate;
private DateTime now;
....


#endregion


protectedoverridevoid Initialize()
{

...


now = DateTime.Today;
// today date
...
}

 
Code
protectedoverridevoid OnBarUpdate()
{ 
...

DateTime  bar  = new DateTime(Bars.GetSessionBar(sessionsBarsAgo).Time.Year, Bars.GetSessionBar(sessionsBarsAgo).Time.Month, Bars.GetSessionBar(sessionsBarsAgo).Time.Day, Bars.SessionBegin.Hour, Bars.SessionBegin.Minute, Bars.SessionBegin.Second);
string format = "MM/dd/yyyy";
// compare bar date to today date if not today return 

 
int result = (DateTime.Compare(bar, now));
if (result < 0)
return;
...


Reply With Quote
  #36 (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

1) the funny counts are incomplete setups, with removecounts = true they dissapear
2) why 2 countdowns ?, 18 count setup is one completed setup
3) for retest please send data for ^NKY i didn't find it at yahoo

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

1) if you put remove counts = true, you don't get countdowns, correct?
2) one completed setup = 9 consecutive counts with each count's close less than the close 4 bars ago. one completed recycle count = 22 consecutive counts. one completed countdown count = 13 not necessrily consecutive counts. While setup and recycle counts are similar ( each count requires a close less than a close 4 bars ago), they are used for different purposes...and their required completed counts are different. Recycling is now 22 counts, not 18 counts. This was revised by Tom Demark in March 2009.
3) ^NKY is daily data on Nikkei 225 Index. This is my own code. You can set it up under Instrument Manager in NT. Data is from Bloomberg. I haven't update the database so the attached data is upto feb 26, 2010.

Attached Files
Elite Membership required to download: ^nky.txt
Reply With Quote
  #38 (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

1) remove counts = true removes incomplete setups [<9 bars] and incomplete countdowns [< 13 bars] if there is cancel of countdown. Shall i not remove countdowns if they are not completed and cancel occurred ?
2) in the example we have a setup of 18 consecutive counts which is for 1 complete setup and therefore only one countdown. Recycle is not implemented yet

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

decs0057,
1) a countdown is only cancelled if i) a setup in the opposite direction is completed or ii) price bar trades below its tdst line if it is a sell setup or prices trade above its tdst line if it is a buy setup and iii) recycling occurs. under no other circumstances are countdowns cancelled.
2) 18 consecutive counts is not 1 setup. It is 2 setups. 1 completed setup is 9 consecutive counts. 18 consecutive counts used to be the count at which recycling occurs. this is no longer applicable as tom demark has recommended/advised that this setting for recycling be changed to 22.

This is why in the past few messages, I kept on asking you to change your setup counts to 9. Setup counts has always been 9 consecutive counts, each counts for a buy setup being lower than its close 4 bars ago. This has been the setting since TD Sequential was created more than 30 years ago.

Reply With Quote
  #40 (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


1) shall i continue to count countdown if it is > 13 ?
2) i will draw TDSTLine for each 9 consecutive setup count. What about countdown, will i start again at 0?

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