PRC QMP Filter to provide trading signals
Forums › ProRealTime English forum › ProOrder support › PRC QMP Filter to provide trading signals
- This topic has 27 replies, 4 voices, and was last updated 3 years ago by
robertogozzi.
-
-
09/25/2018 at 8:48 AM #81263
I want to show the output from this indicator via two lines that cross to provide signals for an auto strategy. Can someone advise me on how to do this please. Alternatively, is there a way of writing code to trade off the colour of the dots?
Regards
Dymjohn
09/25/2018 at 9:19 AM #81266Are you referring to this “QMP filter”? https://www.prorealcode.com/topic/convert-a-macd-strategy-from-mt4/#post-47763
09/25/2018 at 8:04 PM #81302Yes Nicolas, I remember seeing a version of the code in MT4 which shows crosses but no longer have it as I mostly trade on Pro Real time. It has some uses as crosses in Auto trading but I also wondered if its possible to write a strategy which places orders as a result of the “dots” instead?
09/26/2018 at 4:26 PM #81374Here is the complete code that embed at the same time the QMP Filter indicator and the automated trading program:
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384// Definition of code parametersDEFPARAM CumulateOrders = False // Cumulating positions deactivated//PRC_QMP Filter | indicator//29.09.2016//Nicolas @ www.prorealcode.com//Sharing ProRealTime knowledge//--- parametersshort = 12long = 26signal = 9RSIPeriod = 8SF = 1QQE = 3//---// --- MACD ZeroLagEMAshort1 = exponentialaverage[short](close)EMAshort2 = exponentialaverage[short](EMAshort1)DifferenceShort = EMAshort1 - EMAshort2ZeroLagShort = EMAshort1 + DifferenceShortEMAlong1 = exponentialaverage[long](close)EMAlong2 = exponentialaverage[long](EMAlong1)DifferenceLong = EMAlong1 - EMAlong2ZeroLagLong = EMAlong1 + DifferenceLongZeroLagMACD = ZeroLagShort - ZeroLagLongsignal1=ExponentialAverage[signal](ZEROLAGMACD)signal2=ExponentialAverage[signal](signal1)DIFFERENCE2=signal1-signal2SignalMACD=signal1+DIFFERENCE2// --- QQEWildersPeriod = RSIPeriod * 2 - 1if barindex>WildersPeriod thenMyRsi = rsi[RSIPeriod](close)RsiMa = exponentialaverage[SF](MyRsi)AtrRsi = abs(RsiMa[1] - RsiMa)MaAtrRsi = exponentialaverage[WildersPeriod](AtrRsi)dar = exponentialaverage[WildersPeriod](MaAtrRsi) * QQEtrr=TrLevelSlow[1]dv = trrif RsiMA[0]<trr thentrr = RsiMA[0] + darif(RsiMA[1]<dv) thenif(trr>dv) thentrr=dvendifendifelsif RsiMA[0]>trr thentrr = RsiMA[0] - darif(RsiMA[1]>dv) thenif(trr<dv) thentrr=dvendifendifendifTrLevelSlow=trrendif// --- signalsif zerolagMACD>=signalMACD and RsiMA>=trr and lasttrend<>1 thenlasttrend=1elsif zerolagMACD<signalMACD and RsiMA<trr and lasttrend<>-1 thenlasttrend=-1endifgobuy = lasttrend=1 and lasttrend[1]=-1gosell = lasttrend=-1 and lasttrend[1]=1if not longonmarket and gobuy thenbuy at marketendifif not shortonmarket and gosell thensellshort at marketendif1 user thanked author for this post.
04/17/2020 at 8:54 PM #126646Hi everybody
The QMP Filter have been very useful for my manual trading in many markets and I’ve learned to avoid many of the false signals by the help of other indicators (and logical price action).My coding skills are limited and therefore I ask if Nicolas or anybody else can modify the QMP Filter indicator so the signals can be used in building an automated strategy in the “simplified creation” window?
04/17/2020 at 9:32 PM #126649The only indicators that can be used in the “simplified creation” window are those that PRT have available in their platform. I would suggest watching the training videos and checking out all the coding examples in the forums and in the extensive library so that you can learn how easy it is to hard code indicators into your own strategies.
04/17/2020 at 9:51 PM #126650QMP Filter indicator so the signals can be used in building an automated strategy
Hasn’t Nicolas already provided a System using the QMP Indicator … 3 posts above?
04/17/2020 at 11:01 PM #126665Hasn’t Nicolas already provided a System using the QMP Indicator … 3 posts above?
Yes – but perhaps it does not exactly match exactly what kj1988 wants in the way of a strategy.
He has two options because the QMP Filter is not an indicator that is available as a standard indicator on the PRT platform and so cannot be used in the “simplified creation” window. He must learn to code strategies by watching the videos and studying the forums and library or describe exactly the strategy that he has in mind and hope that some kind individual on the forums with more experience will code it for him. Your understanding of code is getting pretty good so I volunteer you GraHal!. The rest of us are way too busy telling newbies that they have not followed the few very simple forum rules! The sooner this worldwide lock down ends the sooner we can stop spending 99% of the day telling people who have suddenly decided that want to get rich via trading that they did not read the few simple rules! 🙂
Rant over…..!
04/18/2020 at 9:36 AM #126696The rest of us are way too busy telling newbies that they have not followed the few very simple forum rules!
I strongly sympathise with your plight!
The Forum Rules in the massive yellow box are being scrolled straight past unread, even when posting!? It beggars belief how unobservant some folk are that they post code and don’t ask themselves … “Why does my code look different than code that others have posted”?? Errhh HELLO … it’s because you didn’t use the ‘Insert PRT Code’ button on the toolbar!!
I think newbies should be required to undertake a multiple choice questionnaire, the correct answers to which make them read and understand the Forum Rules!
Questionnaire could be marked automatically online and would require 100% pass rate before newbies can move on to click the Join button.
IG do it (when opening account) to make sure new traders understand what they are getting into.
I’d best stop, else you’ll be telling me off for going off Topic! 🙂
04/18/2020 at 11:21 AM #126712so I volunteer you GraHal!
Didn’t even have to read the code, just some coarse optimising so I’m sure it can be improved more?
Please post here if anybody does make improvements?EDIT / PS
TF is H1 (.itf title says M5) and spread = 4
MODS
Please delete the M5 .itf as I have also ‘entered values in the optimiser’ for the H1 .itf.
Thank You03/10/2021 at 3:52 AM #163669With the QMP FILTER DOTs that appear on chart, what would be the code snippet to get the LOW price of the candle where the QMP signal occurred. How to get the low or close at GOBUY. it gives true or false return at the moment.
Thanks
03/10/2021 at 10:50 AM #163694The below code of the indicator return the exact price levels of the dots:
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283//PRC_QMP Filter | indicator//29.09.2016//Nicolas @ www.prorealcode.com//Sharing ProRealTime knowledge//--- parametersshort = 12long = 26signal = 9RSIPeriod = 8SF = 1QQE = 3//---// --- MACD ZeroLagEMAshort1 = exponentialaverage[short](close)EMAshort2 = exponentialaverage[short](EMAshort1)DifferenceShort = EMAshort1 - EMAshort2ZeroLagShort = EMAshort1 + DifferenceShortEMAlong1 = exponentialaverage[long](close)EMAlong2 = exponentialaverage[long](EMAlong1)DifferenceLong = EMAlong1 - EMAlong2ZeroLagLong = EMAlong1 + DifferenceLongZeroLagMACD = ZeroLagShort - ZeroLagLongsignal1=ExponentialAverage[signal](ZEROLAGMACD)signal2=ExponentialAverage[signal](signal1)DIFFERENCE2=signal1-signal2SignalMACD=signal1+DIFFERENCE2// --- QQEWildersPeriod = RSIPeriod * 2 - 1if barindex>WildersPeriod thenMyRsi = rsi[RSIPeriod](close)RsiMa = exponentialaverage[SF](MyRsi)AtrRsi = abs(RsiMa[1] - RsiMa)MaAtrRsi = exponentialaverage[WildersPeriod](AtrRsi)dar = exponentialaverage[WildersPeriod](MaAtrRsi) * QQEtrr=TrLevelSlow[1]dv = trrif RsiMA[0]<trr thentrr = RsiMA[0] + darif(RsiMA[1]<dv) thenif(trr>dv) thentrr=dvendifendifelsif RsiMA[0]>trr thentrr = RsiMA[0] - darif(RsiMA[1]>dv) thenif(trr<dv) thentrr=dvendifendifendifTrLevelSlow=trrendif// --- signalsatr=averagetruerange[100]if zerolagMACD>=signalMACD and RsiMA>=trr and lasttrend<>1 thenlasttrend=1r=0g=255b=0drawtext("●",barindex,low-atr/2,Dialog,Bold,12) coloured(r,g,b)ilow = low-atr/2elsif zerolagMACD<signalMACD and RsiMA<trr and lasttrend<>-1 thenlasttrend=-1r=255g=0b=0drawtext("●",barindex,high+atr/2,Dialog,Bold,12) coloured(r,g,b)ihigh = high+atr/2endifreturn ilow,ihigh03/10/2021 at 11:02 AM #163698Out of interest, thought I’d backtest (with no optimising) the Algo I posted above.
All attached is Out of Sample data since 18 Apr 20 when I posted above.
1 user thanked author for this post.
03/10/2021 at 6:01 PM #163743Yep it does, thank you very much.
One more question,
How can I get this indicator to do this,
If QMP green dot appears then wait for green QMP in 15 min before entry. Problem I am having is, QMP occurs in specific hourly candle, and by the time 15 min QMP shows up, the hourly QMP condition is invalid. It is hard to say how many hourly candles will be consumed before 15 min QMP shows up.
I tried to return the trend from the code, but problem is – trend covers all candles between Greed and Red QMP. This is not what I want because as market nears red QMP, its not worth entering.
In short, my condition would be like this: Once 1HR QMP is green, enter long on next upcoming 15 min QMP.
Any help would be great. thanks
05/03/2022 at 10:08 AM #192587Hi,
Is it possible to show only last RED and Green dots rather than several signals on chart. How to modify the code to show only the last 2 signal, buy and sell (only show last buy/or sell and latest buy/sell). Visually the charts becomes very messy due to too many dots.
Any help would be great
thanks in advance
-
AuthorPosts
Find exclusive trading pro-tools on