NexusFi: Find Your Edge


Home Menu

 



Showing results 1 to 5 of 5
Search: Posts Made By: Big Mike
Forum: NinjaTrader March 13th, 2010, 03:32 AM
Replies: 10
Views: 5,050
Posted By Big Mike
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
Posted By Big Mike
MX, The code you provided is not taking...

MX,

The code you provided is not taking trades?

If so, please add some Print(Time[0] + " (" + CurrentBar + "): flagbar = " + flagbarlong) code and paste results.

Mike
Forum: NinjaTrader March 12th, 2010, 09:40 PM
Replies: 10
Views: 5,050
Posted By Big Mike
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
Posted By Big Mike
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
Posted By Big Mike
Perhaps just a flag would do it #var ...

Perhaps just a flag would do it



#var
private int flagbar;

#onbarupdate
if (Close[0] > ma[0] and flagbar == 0) flagbar = CurrentBar;
else
Showing results 1 to 5 of 5

What unexpected challenges have you encountered while trading on a "Funded Trader" platform?

 


 
 


© 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