David Buckley:
maybe like this :)does any one know why i am getting this error and how to fix it, this is the line,
extern int ProfitTarget = (AccountEquity()*1.01);
double init_target=(AccountEquity()*1.01); input double ProfitTarget=init_target;
Yohana Parmi:
maybe like this :)
maybe like this :)
oops.. still get error :(
'init_target' - constant expected
it should be like this :
input double init_target=1.01; double ProfitTarget=AccountEquity()*init_target;( ͡°( ͡° ͜ʖ( ͡° ͜ʖ ͡°)ʖ ͡°) ͡°)
double ProfitTarget=AccountEquity()*init_target;
Only assign constants to global/static variables. The fact that the above code actually compiles doesn't make it correct.
AccountEquity, changes over time but your variable never does. Assign it in OnTick
does any one know why i am getting this error and how to fix it, this is the line,
extern int ProfitTarget = (AccountEquity()*1.01);