Compilation error on web fxdreema
-
Hi,
Constantly getting l0ca1_ in front every gridstart
//-- open price ------------------------------------------------------------- double op=0; if (l0ca1_GridStart=="ask") {op=SymbolAsk();} else if (l0ca1_GridStart=="bid") {op=SymbolBid();} else if (l0ca1_GridStart=="mid") {op=(SymbolAsk()+SymbolBid())/2;} else if (l0ca1_GridStart=="function") {op=_value(0);} op=op-toDigits(l0ca1_GridStartOffset);This is only happening if i put Variables instead of original values.
BR
-
Is there error otherwise? I fixed some problem yesterday, but who knows, maybe another is introduced?
The idea is that when a global variable is used in block, and that variable is with the same name with some local variable for this block (each block is a function in MQL4), then the local variable is prefixed with this "l0ca1_" thing.
In your case, in the block is used variable named "GridStart", and you probably had Variable with the same name, so to not mix them in the function the one that is local is renamed everywhere in that function.