“Multi Time Frame MACD Divergences” Screener
Forums › ProRealTime English forum › ProScreener support › “Multi Time Frame MACD Divergences” Screener
- This topic has 9 replies, 2 voices, and was last updated 7 months ago by MJZTrader.
-
-
04/22/2024 at 9:38 AM #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!04/22/2024 at 1:49 PM #231815Hi,
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?
04/22/2024 at 4:05 PM #23181704/22/2024 at 4:29 PM #23181804/22/2024 at 5:22 PM #23181904/23/2024 at 9:55 AM #231832Good 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) =10D=12
E=26
//F=9//REM MACD
EMAshort1Day = exponentialaverage[D](close)
EMAshort2Day = exponentialaverage[D](EMAshort1Day)
DifferenceShortDay = EMAshort1Day – EMAshort2Day
ZeroLagShortDay = EMAshort1Day + DifferenceShortDayEMAlong1Day = exponentialaverage[E](close)
EMAlong2Day = exponentialaverage[E](EMAlong1Day)
DifferenceLongDay = EMAlong1Day – EMAlong2Day
ZeroLagLongDay = EMAlong1Day + DifferenceLongDayZeroLagMACDDay = 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 = 1else
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 = -1else
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)04/23/2024 at 9:58 AM #23183504/23/2024 at 10:10 AM #231836Well, 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!
04/23/2024 at 1:49 PM #231847Hi 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)
04/23/2024 at 4:04 PM #231862 -
AuthorPosts