PRC MACD Screener

  • This topic has 2 replies, 2 voices, and was last updated 2 days ago by avatarsegie.
Viewing 3 posts - 1 through 3 (of 3 total)
  • #248392

    Hi,

    Please help me with a screener for the code below. For a bull cross over.

    Regards,
    Segie

    #248396

    Hello

    with screener [flag=1](flag as “flag”) for  bullish , change to screener [flag=2](flag as “flag”) if you want bearish :

    // — settings
    short = 12
    long = 26
    signal = 9
    // — end of settings
    EMAshort1 = exponentialaverage[short](close)
    EMAshort2 = exponentialaverage[short](EMAshort1)
    DifferenceShort = EMAshort1 – EMAshort2
    ZeroLagShort = EMAshort1 + DifferenceShort
    flag=0

    EMAlong1 = exponentialaverage[long](close)
    EMAlong2 = exponentialaverage[long](EMAlong1)
    DifferenceLong = EMAlong1 – EMAlong2
    ZeroLagLong = EMAlong1 + DifferenceLong

    ZeroLagMACD = ZeroLagShort – ZeroLagLong

    signal1=ExponentialAverage[signal](ZEROLAGMACD)
    signal2=ExponentialAverage[signal](signal1)
    DIFFERENCE2=signal1-signal2
    SignalMACD=signal1+DIFFERENCE2
    if zerolagMACD crosses over signalMACD then
    flag=1
    endif
    if zerolagMACD crosses under signalMACD then
    flag=2
    endif

    screener [flag=1](flag as “flag”)

    3 users thanked author for this post.
    #248412

    Thank you. How can I add these conditions as well:

    C2=Close < MA20 (price trading below 20 day simple moving average) C3= close>=0.5 and close<=6 (price value between 0.5 and 6)

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

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