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
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
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);