PRC MACD Screener

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #248392 quote
    segiesegie
    Participant
    Senior

    Hi,

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

    Regards,
    Segie

    //PRC_MACD Platinum | indicator
    //29.09.2016
    //Nicolas @ www.prorealcode.com
    //Sharing ProRealTime knowledge
    
    // --- settings
    //short = 12
    //long = 26
    //signal = 9
    // --- end of settings
    
    EMAshort1 = exponentialaverage[short](close)
    EMAshort2 = exponentialaverage[short](EMAshort1)
    DifferenceShort = EMAshort1 - EMAshort2
    ZeroLagShort = EMAshort1 + DifferenceShort
    
    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 signalMACD>=zerolagMACD then
    r=255
    g=69
    b=0
    else
    r=54
    g=224
    b=208
    endif
    
    drawbarchart(signalMACD,zerolagMACD,signalMACD,zerolagMACD) coloured(r,g,b)
    
    if zerolagMACD crosses over signalMACD or zerolagMACD crosses under signalMACD then
    drawtext("●",barindex,signalMACD,Dialog,Bold,12) coloured(r,g,b)
    endif
    
    
    RETURN ZeroLagMACD coloured(54,224,208) style(dottedline,1 ) as "Zero Lag MACD", SignalMACD coloured(255,69,0) style(line,2) as "Signal MACD", 0 coloured(100,100,100) as "zero line"
    
    #248396 quote
    jacquesgermainjacquesgermain
    Participant
    Veteran

    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”)

    Iván González, robertogozzi and segie thanked this post
    #248412 quote
    segiesegie
    Participant
    Senior

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

    C2=Close =0.5 and close<=6 (price value between 0.5 and 6)

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

Stuck on this ProBuilder code?

Describe what this topic is trying to build, in plain English, and ProRealAI writes the ProRealTime™ indicator, screener or system for you.

Available in 7 languages
Try ProRealAI

PRC MACD Screener


ProScreener: Market Scanners & Detection

New Reply
Author
author-avatar
segie @segie Participant
Summary

This topic contains 2 replies,
has 2 voices, and was last updated by segiesegie
1 year, 3 months ago.

Topic Details
Forum: ProScreener: Market Scanners & Detection
Language: English
Started: 06/19/2025
Status: Active
Attachments: No files
ProRealCode ProRealCode
Loading...