Hi!
Just starting out with some coding in prt.
I also use MT4 and would greatly appreciate if someone could
help me how this would translate in mt4 (mql).
I use it when i backtest trend indicators performance.
DEFPARAM CumulateOrders = False
Indicator1 = CCI[20](typicalPrice)
ATR = AverageTrueRange[20](close)
BuyOrder = (Indicator1 CROSSES OVER 0)
IF BuyOrder THEN
BUY 1 CONTRACT AT MARKET
SL = ATR *1
TP = ATR *2
ENDIF
SellOrder = (Indicator1 CROSSES UNDER 0)
IF SellOrder THEN
SellShort 1 CONTRACT AT MARKET
SL = ATR *1
TP = ATR *2
ENDIF
SET STOP LOSS SL
SET TARGET PROFIT TP