MACD & 200 EMA Strategy

Forums ProRealTime English forum ProOrder support MACD & 200 EMA Strategy

Viewing 4 posts - 1 through 4 (of 4 total)
  • #207376

    Hello,

    Would it be possible to code a strategy using the MACD and 200 period EMA please. The Strategy works as follows:

    It takes a Long trade when the MACD crosses up over the Signal line, when both the signal line and MACD are below the Zero line, and price closed above the 200 EMA .
    It takes a Short trade when the MACD crosses under the signal line, when both the Signal line and the MACD are above Zero line, and price closed below the 200 EMA.

    If possible, an alert could be developed to confirm when the conditions of the strategy are met.

    The 100 EMA should also be enabled to provide earlier indication of a change in trend and to allow for a crossing strategy over or under the 200 EMA to be used.

    ORDERS
    You can have both Long and Short, or disable one.

    STOPLOSS
    Stoploss is based on last swing (high or low). The lookback period of the swing should adjustable. The Stoploss can also be above or below the 200 EMA depending on the direction of the trade.

    TAKE PROFIT
    For now, there is 2 possibilities for TP : Using adjustable Risk/Reward ratio (Trailing Stoploss need to be at 0) Using adjustable Trailing Stoploss percentage (RR Ratio need to be at 0)

     

    #207410
    JS

    Hi @Marketpunk

    Maybe you can start with this…
    Stoploss has yet to be added… (based on swing high/low?)

    1 user thanked author for this post.
    #207484

    Hello JS

    Thank you very much for supplying the code. Much appreciated.  I’ll upload now. Was it working as expected?

    The stop loss is based on the most recent swing low/high and/or the 200 period EMA.

    Best regards

    MP

     

    1 user thanked author for this post.
    avatar JS
    #208964

    Hi JS,

    Thank you again for providing the code for the MACD & 200 EMA strategy. Much appreciated.

    The stop loss is based on the most recent swing low/high and/or the 200 period EMA. If you could add this when you have an opportunity,  it would be great please.

    Best regards

    MP

     

     

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

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