GBPUSD Long Only & Bull Market Strategy – Based on ROC and MACD. While I am getting to learn how to create these codes here is a simple one that yields a profit for this year on 1 hour bars. I am trying to create a strategy that only buys into breakouts. Not sure playing with ROC is a good idea but does seem to yield good results if used with other indicators.
// Definition of code parameters
DEFPARAM CumulateOrders = False // Cumulating positions deactivated
// Conditions to enter long positions
indicator1 = ROC[100](close)
c1 = (indicator1 >= 0.5)
IF c1 THEN
BUY 2 PERPOINT AT MARKET
ENDIF
// Conditions to exit long positions
indicator2 = MACDline[12,26,7](close)
indicator3 = Average[21](MACD[15,34,15](close))
c2 = (indicator2 CROSSES UNDER indicator3)
IF c2 THEN
SELL AT MARKET
ENDIF
// Stops and targets
SET STOP %LOSS 0.5
Hi
ROC can be a good indicator unfortunately people use more often normalised indicator such as rsi.
Do you backtest it with other pairs ?
Do you already code it for short position?