GBPUSD long only strategy based on ROC and MACD

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #8129 quote
    markouk
    Participant
    Average

    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
    untitled-1464246133c8p4l1.jpg untitled-1464246133c8p4l1.jpg
    #8253 quote
    Yannick
    Participant
    Veteran

    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?

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.

GBPUSD long only strategy based on ROC and MACD


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
markouk @markoukay Participant
Summary

This topic contains 1 reply,
has 2 voices, and was last updated by Yannick
9 years, 8 months ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 05/26/2016
Status: Active
Attachments: No files
Logo Logo
Loading...