200 EMA & MACD Indicator

Forums ProRealTime English forum ProBuilder support 200 EMA & MACD Indicator

Viewing 8 posts - 1 through 8 (of 8 total)
  • #233226

    Hello,

    Would it be possible to get code an indicator  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

    #233249

    Haven’t you asked the question before?

    https://www.prorealcode.com/topic/classic-macd-200ema-strategy/

    #233256

    Hi Thanks for replying,

    The previous request was for a strategy.

    This request is for an indicator that can be used as a screener.

    Best regards

    Brian

    #233265

    Hi
    This could be something closed to that you are looking for:

    #233286

    Hi Ivan,

    Thank you very much for this. It’s much appreciated.

    I have a couple of queries that you might be able to answer or provide a solution please.

    1. The indicator should be used on the price chart. How can this be done?
    2. Can the code be included in ProScreener to identify instruments that provide a signal generated by the indicator

    Best regards

    Brian

    #233300

    Hi Iván,

    Thank you for your great work on the requested indicator.

    I have figured out how to get the indicator onto the price chart and I’ll see if it works.  The indicator is on TradingView so I can do a comparison. I’ll let you know after the test.

    Could the code for the indicator be used in ProScreener? Would it be possible to get the amended code to enable this to work in ProScreener?

    Thanks again for your assistance.

    Best regards

    #233325

    Hi
    Yes it can work for a screener but you need to delete all drawing instructions and the last line should be screener[long or short] instead return

    #233328

    In addition, Ema200 won’t work, as screeners with IG have a 256-bar lookback limit, but a 200-period EMA greatly exceeds that limit (I once tested an EMA and it worked fine with some 80 periods, if I remeber correctly). Lower those periods or switch to an SMA.

     

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

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