EA Shift to Pip Error ?
I am getting trades placed when the Pip amount is less than original signal 3 bars back, when it should only enter a trade if the the price is Plus 7 Pips or greater than the signal 3 bars back.
Any help on why this is would be appreciated thanks. ??
Might this have something to do with the coding of GlobalVariableGet (see below) or is it another issue?
//+------------------------------------------------------------------+ //| Expert tick function | //+------------------------------------------------------------------+ void OnTick() { double CCI_H4=0; double CCI_H4shift3=0; if (iBars(NULL,PERIOD_H4)>14) CCI_H4 = iCCI(NULL,PERIOD_H4,14,PRICE_MEDIAN,3); GlobalVariableSet("CCI_H4shift3",CCI_H4);
Thanks so much
thanks for what ? do you know a fix?
- Use the debugger or print out your variables, including _LastError and find out why.
- GVs are for inter-process communication (or poor-man's persistent storage.) You don't need either.