Hi everyone
Can you please convert this code from ProRealtime language (based on BASIC, so it's quite simple) into an MQL 4 Expert Advisor?
// PARAMETERS
DEFPARAM CumulateOrders = False
DEFPARAM flatafter = 210000
// Stops and TPs
myTarget=5*AverageTrueRange[14](close)
myStop=1*AverageTrueRange[14](close)
// Indicators
MM = Average[200](close)
iMACD = MACD[12,26,9](close)
// Buy
ca1 = close > MM
ca2 = iMACD > 0
IF ca1 AND ca2 AND time >= 090000 THEN
BUY AT MARKET
ENDIF
// Sell
cv1 = close < MM
cv2 = iMACD < 0
IF cv1 AND cv2 AND time >= 090000 THEN
SELLSHORT AT MARKET
ENDIF
// Objectives
SET STOP LOSS myStop
SET TARGET PROFIT myTarget