“Multi Time Frame MACD Divergences” Screener

Forums ProRealTime English forum ProScreener support “Multi Time Frame MACD Divergences” Screener

Viewing 10 posts - 1 through 10 (of 10 total)
  • #231799

    Good morning everyone! This post and therefore my question is in regards to the free “Multi Time Frame MACD Divergences” Screener which can be found under the Library Files section.

    I was trying to tweek the code in the way as to set it for intraday (1 Min to 60 Min) usage, but unfortunately with very limited success!

    Can anyone kindly be of help?
    Thank you so much in advance and all the best!
    #231815
    JS

    Hi,

    Maybe it’s too simple, but can’t you adjust the current timeframes for intraday…?

    TimeFrame(Weekly) => TimeFrame(Daily)

    TimeFrame(Daily) => TimeFrame(1 hour)

    I think divergences on a “faster” time frame, for example 1 minute, is a bit too far-fetched…

    What is the meaning/value of a divergence based on a 1-minute time frame?

    #231817

    Hi JS! Thank you for getting in touch with me!

    Well, that is what I thought too! I simply changed the timeframe to “(5MN)”, but unfortunately it did not work!

    #231818
    JS

    Hi,

    I’m assuming you’ve changed the time frame in the code…

    Can you tell us what didn’t work?

    #231819
    JS

    Hi,

    When I use the original screener with a time frame of 1 day & 1 minute, the screener does work and there are also results…

    #231832

    Good morning & thank you for coming back to me so fast JS! Well, I changed the code in the way that I deleted all in regards to the weekly part first, and then put the second lower part to timeframe (5Mn). The result was that there were no results! By the way, when I am screening on a daily basis, it all works just fine and I am getting results!

    Here is my modified code:

    timeframe (5Mn)

    MinPrix = close >2.5
    MinVolume = summation [10](average[23](volume)> 100000) =10

    D=12
    E=26
    //F=9

    //REM MACD

    EMAshort1Day = exponentialaverage[D](close)
    EMAshort2Day = exponentialaverage[D](EMAshort1Day)
    DifferenceShortDay = EMAshort1Day – EMAshort2Day
    ZeroLagShortDay = EMAshort1Day + DifferenceShortDay

    EMAlong1Day = exponentialaverage[E](close)
    EMAlong2Day = exponentialaverage[E](EMAlong1Day)
    DifferenceLongDay = EMAlong1Day – EMAlong2Day
    ZeroLagLongDay = EMAlong1Day + DifferenceLongDay

    ZeroLagMACDDay = ZeroLagShortDay – ZeroLagLongDay

    //signal1Day=ExponentialAverage[F](ZEROLAGMACDDay)
    //signal2Day=ExponentialAverage[F](signal1Day)
    //DIFFERENCE2Day=signal1Day-signal2Day
    //
    //SignalMACDDay=signal1Day+DIFFERENCE2Day

    /// Divergence MACD Day

    W=ZeroLagMACDDay

    once RefCloseDownOldDay=0
    once RefMACDDownOldDay=0
    once RefCloseUpOldDay=0
    once RefMACDUpOldDay=0
    //once BarBullOld=0
    //once BarBearOld=0

    //Conditions to identify max and min
    d1=w[4]>w[2] and w[3]>w[2] and w[1]>w[2] and w>w[2] // down
    d2=w[4]<w[2] and w[3]<w[2] and w[1]<w[2] and w<w[2] // top

    //finding the double bottom

    if d1 then
    RefCloseDownNewDay=close[2]
    RefMACDDownNewDay=w[2]
    //BarBullNewDay=barindex[2]
    endif
    if RefCloseDownNewDay<RefCloseDownOldDay and RefMACDDownNewDay>RefMACDDownOldDay and close >ExponentialAverage[200](close) then
    //double slash next line if you don’t needed the mark on a different window
    bulldivDay=1
    signal = 1

    else
    bulldivDay=0
    endif

    //Finding the double top
    if d2 then
    RefCloseUpNewDay=close[2]
    RefMACDUpNewDay=w[2]
    //BarBearNew=barindex[2]
    endif
    if RefCloseUpNewDay>RefCloseUpOldDay and RefMACDUPNewDay<RefMACDUpOldDay and close < ExponentialAverage[200](close)then
    //double slash next line if you don’t needed the mark on a different window
    beardivDay=1
    signal = -1

    else
    beardivDay=0
    endif
    //grafica
    RefCloseDownOldDay=RefCloseDownNewDay
    RefMACDDownOldDay=RefMACDDownNewDay
    RefCloseUpOldDay=RefCloseUpNewDay
    RefMACDUpOldDay=RefMACDUpNewDay
    //BarBullOld=BarBullNew
    //BarBearOld=BarBearNew

    ////////////////////////////////////////////////
    SCREENER [((beardivDay or bulldivDay)) and MinPrix and MinVolume ](signal)

     

    #231835

    Let me try what you did JS! and leave the  weekly part in the code and put it to Daily and modify the Daily lower part to 1 Min….

    #231836

    Well, I did as you did JS and put the upper part of the code to Daily and the lower part to 1 Min and it works, but I am getting too many results 173 bei using CBOE US Stocks. Only 50 are allowed per list.

    When I put both time intervals to intraday, like 60 Mn and 1 Mn, the screening starts but stops all of a sudden altogether!

    #231847
    JS

    Hi MJZ,

    The results of a screener are shown in the list and how many results this list can contain depends on the PRT version you are working with. In PRT -Complete I think a maximum of 50 results are shown in the list and when using PRT -Premium a maximum of 100 results can be shown in a list… (a commercial thing)

    I think it’s best to use both the timeframes because that’s how the screener is set up…

    Use of 60 minutes is not allowed in a screener (don’t know why) but you can use a time frame of 1 hour… 😉

    In the screenshot the screener with a time frame of 1 hour and a time frame of 1 minute… (only 1 result)

    #231862

    Thank you so much JS! Have a good time & all the best for your trading!

    1 user thanked author for this post.
    avatar JS
Viewing 10 posts - 1 through 10 (of 10 total)

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