Forum

iMA mismatch values

I'm new to MQL4. Trying to use iMA in an EA to identify HA close cross a MA on bar 1. It compiles with no errors and no exceptions. Here's the logic and code lines: (HAClose1>MAH1) HAClose1=(Open[1]+High[1]+Low[1]+Close[1])/4; MAH1 = iMA(NULL,0,SMMAperiod,1,MODE_SMMA,PRICE_HIGH,1); //I tried