![]() |
|
|||||||
| General Programming General NinjaScript programming questions. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Senior Member
Join Date: Sep 2009
Posts: 562
Thanks: 40
Thanked 5 times in 4 posts
|
Here is the code:-
Code:
privatevoid ProcessBuySequential()
{
if (Close[0]<=Low[2])
{
BuySeqCount++;
this.TDBuySeqDrawText(BuySeqCount.ToString());
if (BuySeqCount == 5)
{
buycountdown5 = Close[0];
}
elseif (BuySeqCount == 8)
{
if (Low[0] <= buycountdown5)
{
BuySeqCount++;
this.TDBuySeqDrawText(BuySeqCount.ToString());
buycountdown8 = Close[0];
}
else
{
this.TDBuySeqDrawText("+");
}
}
}
}
privatevoid TDBuySeqDrawText(string strText)
{
BuySeq++;
DrawText(BuySeq.ToString(), strText, 0, (Low[0]-SMA(Range(),BuySetupBars)[0]*0.4), Color.Red);
strBuySeqTags.SetValue(BuySeq.ToString(), SequentialTags++);
}
|
|
|
|
|
|
#2 |
|
NinjaTrader Product Manager
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 107 times in 70 posts
|
Unfortunately I do not see anything with a quick review. What I suggest is for you to Print() your counter value at each step of the way along with a timestamp to see at what time it becomes what value. Then run through the code logic slowly by hand to see what is going on.
Josh
NinjaTrader Customer Service |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Any ideas why this is not working correctly please | vast524 | Strategy Development | 9 | 07-28-2009 04:07 PM |
| How to do this correctly? | ScalpGuy | Indicator Development | 3 | 07-24-2009 06:43 AM |
| Print() | duck_CA | Strategy Development | 2 | 03-07-2009 01:18 PM |
| Print() help | frogzillafx | Indicator Development | 5 | 10-21-2008 10:26 AM |
| Print() | WDieter | General Programming | 2 | 05-23-2008 10:55 AM |