Looks like its caused by your not supplying the correct parameters to the candle calls.
Try replacing:
hi=iHigh(NULL,0,0); lo=iLow(NULL,0,0);
with:
hi=iHigh(Symbol(),Period(),0); lo=iLow(Symbol(),Period(),0);
which will give you data for current symbol and period or you can substitute alternative symbols/periods.
Or - if you are happy to limit yourself to current symbol/period then:
hi=High[0];
lo=Low[0];
CB
Looks like its caused by your not supplying the correct parameters to the candle calls.
Try replacing:
with:
which will give you data for current symbol and period or you can substitute alternative symbols/periods.
Or - if you are happy to limit yourself to current symbol/period then:
hi=High[0];
lo=Low[0];
CB
Hi ya,
Ty for the reply, the Symbol() & Period() addition was the same as null and 0 unfortunately :[ I've noticed when the sum is returned it's not a whole number. e.g 0.00070
So dividing it with the free margin causes incorrect calculations... (I assume)
Any ideas welcome!

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hello!
I've tried to knock together a quick lot calc that takes the the current bar High/Low difference and divides it against 3% of your free margin..
However i'm getting unexpected results & I cant seem to work out why... It would seem that the Bid-lo & hi-Bid return results with many 0s in the decimal places
I'm sure its simple but if someone could point me in the right direction there will be love :]