OmniTrader Professional Forum OmniTrader Professional Forum
forums calendars search
today this week
 
register logon control panel Forum Rules
You are currently browsing as a guest.
You should logon to access more features
A Self-Moderated Community - ALL MEMBERS, PLEASE READ!
Vote for Members who contribute the most to your trading, and help us moderate content within the Forums.


  Current location        Thread information  
OmniTrader Professional Forum
OmniLanguage Discussion
Qualitative Quantitative Estimation.QQE indicator
Last Activity 10/5/2024 12:51 AM
6 replies, 4063 viewings

Jump to page : 1
Now viewing page 1 [25 messages per page]
 
back reply
Printer friendly version

^ Top
Manfred

Veteran
100100
Posts: 210

Joined: 4/2/2006
Location: South Africa

User Profile
 
Subject : Qualitative Quantitative Estimation.QQE indicator
Posted : 1/11/2019 5:27 AM
Post #30237

I have long been looking to create an OT version of a heavily modified RSI indicator known as Qualitative Quantitative Estimation (QQE) I came across in Metatrader where I use it successfully in FX trading. I made various attempts in OL but only today got to a solution that plots quite well and appears to be same/similar to the MT4 version.

I include a screencap of a chart of NFLX using Roman Ignatov's 2006 + Tim Hyder's "QQE with Alerts" MT4 code of 2008. This is what I've been trying to emulate. The Prorealtime approach referenced doesnt quite look as good to me as an indicator. I tried that in OT and scrapped it in favour of the MT4 code.

Below is some adapted code that finally plots something useful in OT. At first glance its not as exciting on stocks as FX ito signal ambiguity but possibly with some additional entry filters could assist within a trading system.

The basic systems idea is this:
BUY signal: when the blue line crosses level 50 from below after crossing the orange line from below.
SELL signal: when the blue line crosses level 50 from above after crossing the orange line from above.

Some additional trading interpretations here - https://www.mql5.com/en/code/198

There are several different methods in which the QQE can be used to generate trading signals. Here are few of the more common techniques:

Crossovers:

RSI / Fast ATR TL or Slow ATR TL Crossover: A buy signal occurs when the RSI crosses above the Fast ATR TL or Slow ATR TL and a sell signal occurs when RSI crosses below the Fast ATR TL or Slow ATR TL.
RSI / 50-level Crossover: When the RSI crosses above 50 a buy signal is given. Alternatively, when the RSI crosses below 50 a sell signal is given.
Fast ATR TL / Slow ATR TL Crossover: A buy signal occurs when the Fast ATR TL crosses above the Slow ATR TL and a sell signal occurs when Fast ATR TL crosses below the Slow ATR TL.

Divergence:

Looking for divergences between the QQE indicator and price can prove to be very effective in identifying potential reversal points in price movement. Trade long on Classic Bullish Divergence: Lower lows in price and higher lows in the QQE; Trade short on Classic Bearish Divergence: Higher highs in price and lower highs in the QQE.

Overbought/Oversold Conditions:

Much like the original RSI (and other oscillators), the QQE indicator can be used to identify potential overbought and oversold conditions in price movements. An Overbought condition is generally described as the QQE being greater than or equal to the 70% level while an oversold condition is generally described as the QQE being less than or equal to the 30% level. Trades can be generated when any of the QQE outputs (RSI, Fast ATR TL or Slow ATR TL) crosses these levels. When the RSI, Fast ATR TL or Slow ATR TL crosses above 30 a buy signal is given. Alternatively, when the RSI, Fast ATR TL or Slow ATR TL crosses below 70 a sell signal is given.

Have fun,

Cheers

[Edited by Manfred on 1/11/2019 5:44 AM]

Attached file : QQE.txt (2KB - 423 downloads)
Attached file : QQE_Example_Omnitrader_NFLX.png (76KB - 342 downloads)
Attached file : QQE_Example_Omnitrader_SPY.png (79KB - 328 downloads)
Attached file : QQE_Example_Metatrader.png (60KB - 302 downloads)
Attached file : QQE_Example_OTvsMT.png (140KB - 310 downloads)

^ Top
wolf

Veteran
10025
Posts: 135

Joined: 4/21/2011
Location: Germany

User Profile
 
Subject : RE: Qualitative Quantitative Estimation.QQE indica
Posted : 1/11/2019 5:51 AM
Post #30238 - In reply to #30237

Hello Manfred,
thank you very much for sharing recently different OL indicator codings and explanations within this Forum. I think it is a great help for those which are not very familiar with the OL coding philosphy.

Wolfgang

[Edited by wolf on 1/11/2019 7:20 AM]

^ Top
Manfred

Veteran
100100
Posts: 210

Joined: 4/2/2006
Location: South Africa

User Profile
 
Subject : RE: Qualitative Quantitative Estimation.QQE indica
Posted : 1/11/2019 8:57 AM
Post #30239 - In reply to #30237

At the risk of sowing confusion there is also a QQE indicator which has both fast and slow lines. The Metatrader code for this is somewhat cryptic to my brain refer https://www.mql5.com/en/code/20650 so I may not have converted it 100% correctly. However, of the face of it it appears workable. I also revised the colours to align with the MT5 code I worked from. This indicator I named QQE2 to distinguish it from the earlier one.

I provide an OT comparison png below along with the updated QQE2 code and also a Chart template.

Really the only difference I can see is that the "fast" line not surprisingly given its name responds a little faster than the slow line of the original QQE. In practice I have my doubts if it will make much difference in trading so either indicator should have a modicum of potential for a system.



[Edited by Manfred on 1/11/2019 9:06 AM]

Attached file : QQE2_Example_Metatrader.png (296KB - 281 downloads)
Attached file : QQE2vsQQE_Example_Omnitrader_SPY.png (76KB - 255 downloads)
Attached file : QQE2.txt (4KB - 257 downloads)
Attached file : QQE.otd (152KB - 240 downloads)

^ Top
Manfred

Veteran
100100
Posts: 210

Joined: 4/2/2006
Location: South Africa

User Profile
 
Subject : RE: Qualitative Quantitative Estimation.QQE indica
Posted : 1/11/2019 9:29 AM
Post #30240 - In reply to #30237

Hi Wolfgang,

Glad you appreciate the efforts, its my way of motivating myself to get some refresher Omnilanguage coding practice while hopefully helping out OT users as well. Also I'm procrastinating from housework while on holiday ;-) Despite upgrading regularly I largely lost touch with OT for a few years due to work pressures so am resolving to reduce my corporate stress levels somewhat by aspiring towards Ed's adage of "my computer(s) support me" after this year. Even if I only get there halfway it'll still be an improvement on my status quo.

Less altruistically I'm also hoping to get user feedback on improving any of these indicators or ideas on how to optimally use them in a system since many forum hands make light(er) work after all.

Grüße
^ Top
Manfred

Veteran
100100
Posts: 210

Joined: 4/2/2006
Location: South Africa

User Profile
 
Subject : RE: Qualitative Quantitative Estimation.QQE indica
Posted : 1/11/2019 4:04 PM
Post #30242 - In reply to #30237

I wasn't quite happy with the signals on stocks so experimented with replacing RSI with a "non-lagging" Jurik RSX similar to https://www.mql5.com/en/code/21580. I think I uploaded the RSX indicator to the forum in December but in case I didn't will add to the attachments as well.

JSX is an RSI smoothed with the "Jurik" approach - it is not 100% Jurik since that is proprietary but its probably pretty close according to the MT5 code, it has very low lag and is very smooth, hence in theory provides clearer signals.

You will need to have both indicators available in your VBA Indicators folder since the QQE2RSX code calls/uses the JurikRSX indicator function.

I also had a look at changing the earlier QQE2 indicator to plot as a histogram. I'm not convinced its any clearer this way but include it in case someone prefers this view.


[Edited by Manfred on 1/11/2019 4:23 PM]

Attached file : ChartTemplate-QQE2RSX.otd (152KB - 253 downloads)
Attached file : QQE2RSX.txt (4KB - 285 downloads)
Attached file : JurikRSX.txt (1KB - 282 downloads)
Attached file : QQE2hist.txt (4KB - 276 downloads)
Attached file : QQE2withJSX_Example_Omnitrader.png (84KB - 330 downloads)

^ Top
Manfred

Veteran
100100
Posts: 210

Joined: 4/2/2006
Location: South Africa

User Profile
 
Subject : RE: Qualitative Quantitative Estimation.QQE indica
Posted : 1/12/2019 4:18 AM
Post #30243 - In reply to #30242

In my "shower thought of the day" I wondered why I was smoothing an already smoothed input in the earlier QQE2RSX indicator. All I could see it doing was introducing signal lag, hence I removed it in the version below QQE3RSX.
OT code progression as follows:

1. QQE2 - Original QQE:

#Param "RSIperiod",14,2,100 'default 14 RSI period
#Param "SF",5,1,50 'default 5 RSI smoothing factor
MyRsi = RSI(Close,RSIPeriod)
RsiMa = EMA(MyRsi,SF)

2. QQE2RSX - QQE with JSX (double smoothed):

#Param "RSIperiod",14,2,100 'default 14 RSI period
#Param "SF",5,1,50 'default 5 RSI smoothing factor
MyRsi = JurikRSX(Close,RSIPeriod)
RsiMa = EMA(MyRsi,SF)


3. QQE3RSX - QQE with JSX smoothed with JSX only:

#Param "RSIperiod",14,2,100 'default 14 RSI period
RsiMa = JurikRSX(Close,RSIPeriod)


Attached file : QQE3withJSXnoSF_Example_Omnitrader.png (102KB - 270 downloads)
Attached file : QQE3RSX.txt (4KB - 260 downloads)

^ Top
Mel

Veteran
10010025
Posts: 235

Joined: 3/18/2006

User Profile
 
Subject : RE: Qualitative Quantitative Estimation.QQE indica
Posted : 1/13/2019 10:54 AM
Post #30249 - In reply to #30243

Here is what I think is a better way of using the RSI. The attached code is an RSI built on Ehlers filters, and it is predictive. The threshold lines on an RSI say .3, determine when in a cycle a signal is generated. the old way generated a laging signal when the RSI came up through the lower threshold. Ehlers predictive way is to generate a signal when the RSI first goes below the lower threshold, a few bars ahead of the turn. The RSIx is that predictive crossing on a traditional RSI, not an Ehlers RSI.

An RSI period needs to be 1/2 the wavelength of the cycle you are trading (all oscillators are trading cycles and you need to know what they are, normally it is the dominant cycle.) My convention is to use domcyc as the period, and divide it by two in the code for RSI. Since some oscillators like MACD and CCI use the full domcyc as their parameter, it saves me confusion.

This code allows you to set the floor and ceiling wavelength in bars of the cycles you want to trade in the chart, eliminating the jagged noise generated by short wavelengths, and the trend drag of longer wavelengths. Better signals that way. If you select turns, you get signals on turns in the OBOS range. If you select predict, it generates signals from threshold crossings ThresholdPredict=0 generates signals the old lagging late cross, =1 generates predictive signals. This form of RSI is the most accurate I know of.

You need some way of knowing what the dominant cycle is. I use the Spectrum indicator, and using that indicator, you can write code that adapts to the cycle length.

What happens if you use an oscillator and it is not tuned to the dominant cycle? It produces unreliable leading or lagging signals. It is the case that there is no one period that is best in an oscillator - it needs to be set to whatever the current cycle is on the current symbol.

Set the floor and ceiling to bound the cycle lengths you are interested 1n. It is not really practical to cycle trade wavelengths less than 10 bars. so set you floor to 10, set the ceiling to 40 or 50 for most trading. A monthly cycle is 20-22 bars. For longer term trades, you can up those numbers.

Mel

[Edited by Mel on 1/13/2019 12:28 PM]

Attached file : eRSIpassband.txt (3KB - 261 downloads)
Attached file : eRSIpassband.txt (3KB - 254 downloads)

Jump to page : 1
Now viewing page 1 [25 messages per page]
back reply

Legend    Action      Notification  
Administrator
Forum Moderator
Registered User
Unregistered User
E-Mail this thread to a friend
Toggle e-mail notification


Nirvana Systems
For any problems or issues please contact our Webmaster at webmaster@nirvsys.com.