Forum: NinjaTrader
March 13th, 2010, 03:32 AM
|
Replies: 10
Views: 5,050
Ok so the problem is here
if (Close[0] >...
Ok so the problem is here
if (Close[0] > EMA(fastMA)[0] && Close[0] > EMA(slowMA)[0] && flagbarlong == 0) flagbarlong = CurrentBar;
//if (flagbarlong + 10 > CurrentBar) flagbarlong = 0;
else...
|
Forum: NinjaTrader
March 13th, 2010, 02:19 AM
|
Replies: 10
Views: 5,050
|
Forum: NinjaTrader
March 12th, 2010, 09:40 PM
|
Replies: 10
Views: 5,050
You still aren't checking for a higher close...
You still aren't checking for a higher close against the flagbar.
if (Close[0] > EMA(fastMA)[0] && Close[0] > EMA(slowMA)[0]
&& Close[1] > EMA(fastMA)[1] && Close[1] > EMA(slowMA)[1]
&&...
|
Forum: NinjaTrader
March 11th, 2010, 08:26 PM
|
Replies: 10
Views: 5,050
Yes, you must remember:
Close[0] >...
Yes, you must remember:
Close[0] > Close[CurrentBar - flagbar]
</span></span>In other words, remember to compare to [CurrentBar - flagbar], so we look xx bars back for that closing price. ...
|
Forum: NinjaTrader
March 11th, 2010, 07:58 AM
|
Replies: 10
Views: 5,050
|