Moving Average Switch
See 'bug in MQL4 double calculation' and change your condition by more correctly one
if(Bid==MAClose)You will understand why Bid not equal to other double number.
logically both values can be equal, but you need to use NormalizeDouble
if(NormalizeDouble(Bid,Digits) == NormalizeDouble(MAClose,Digits))
For some reason when I run the backtest- "MyOrderType" never becomes "2". I don't know why. The price is obviously hitting the 34 Period Moving Average line, but the "MyOrderType =2" command isn't going through- as it is not being printed in the journal.
Could anyone tell me why?
*note* I have tried switching "Bid" to "Point", and I have tried switching the Bar shift of the MAClose to 1. Also- I am not running optimization setting on backtest.
-J