Classic MACD 200EMA Strategy

Forums ProRealTime English forum ProOrder support Classic MACD 200EMA Strategy

Viewing 5 posts - 1 through 5 (of 5 total)
  • #214512

    Hello,

    Would it be possible to get code for a strategy please as follows:-

    The trading timeframe is open to accommodate trading on all timeframes.

    A buy signal is generated when the MACD crosses up over the MACD Signal line and the signal line and MACD are below the Zero line, and price closes above the 200 Exponential Moving Average.

    Stop loss for a buy signal is based on the most recent swing low and/or the 200 period Exponential Moving Average whichever is nearest the price when the trade is taken.

    A sell signal is generated when the MACD crosses under the MACD signal line and the signal line and MACD are above the MACD Zero line, and price closes below the 200 EMA.

    Stop loss for a sell signal is based on the most recent swing high and/or the 200 period Exponential Moving average whichever is nearest the price when the trade is taken.

    Take Profit can be based on either Option 1 an adjustable Risk/Reward ratio (Trailing Stop loss to be at 0) or Option 2 an adjustable Trailing Stop loss percentage (risk /reward ratio to be at 0).

    Appreciate any assistance. Thank you

    #214527

    Hi, I think I this response may be for someone else. Thanks

    #214600

    I think that what you are asking for is not very complicated, here is the beginning of a code that may help you for the next step 😊

    1 user thanked author for this post.
    #217632

    I took some time to add the final conditions of the strategy based on ZeroCafeines start.

    Here’s the code. Looks pretty good on DAX Daily (backtest for 200k units attached)

     

    1 user thanked author for this post.
    #226824

    Hi,

    Thank you for your code for back testing the strategy. Just wondering would it be possible to get code to use this as an indicator please.  Thanks again for your assistance.

Viewing 5 posts - 1 through 5 (of 5 total)

Create your free account now and post your request to benefit from the help of the community
Register or Login