TradingView
glaz
2015年2月20日早上12點05分

QQE MT4 

U.S. Dollar/Japanese YenFXCM

描述

QQE (Quantative Qualitative Estimation) MT4 Version by Roman Ignatov
Another indicator from MT4 to pinescript, from a google search i found the that the original author is unknown and its best used for volatile pairs /JPY
yellow line is a smoothed rsi,
red line "slow trailing stop" is the ATR smoothing with a 14-periods wilders smoothing function that is multiplied by a factor of 4.236
Also big thanks to BlindFreddy, i used part of his supertrend indicator to make it work
評論
uassamoon
Hey!!
Is it possible that this is a refaint?
JoshuaMcGowan
@yuriolov, I dont see any of the usual reasons why. Details found here on what would cause repainting, I dont think this script is at much risk of repainting. tradingview.com/pine-script-docs/en/v4/essential/Indicator_repainting.html
hawrie_uk
Hello Dear Glaz , can you convert to verion 4 or 5 please?
Jay1176
mt4 code on web plot different values, can you please post mql4 code for your indicator

//----
#property indicator_separate_window
#property indicator_buffers 2
#property indicator_color1 Gold
#property indicator_style1 STYLE_SOLID
#property indicator_width1 2
#property indicator_color2 Pink
#property indicator_style2 STYLE_DOT
//----
extern int SF=5;
//----
int RSI_Period=14;
int Wilders_Period;
int StartBar;
//----
double TrLevelSlow[];
double AtrRsi[];
double MaAtrRsi[];
double Rsi[];
double RsiMa[];
//+------------------------------------------------------------------+
//| |
//+------------------------------------------------------------------+
int init()
{
Wilders_Period=RSI_Period * 2 - 1;
if (Wilders_Period < SF)
StartBar=SF;
else
StartBar=Wilders_Period;
//----
IndicatorBuffers(6);
SetIndexBuffer(0, RsiMa);
SetIndexStyle(0, DRAW_LINE, STYLE_SOLID, 2);
SetIndexLabel(0, "Value 1");
SetIndexDrawBegin(0, StartBar);
SetIndexStyle(1, DRAW_LINE, STYLE_DOT);
SetIndexBuffer(1, TrLevelSlow);
SetIndexLabel(1, "Value 2");
SetIndexDrawBegin(1, StartBar);
SetIndexBuffer(2, AtrRsi);
SetIndexBuffer(3, MaAtrRsi);
SetIndexBuffer(4, Rsi);
IndicatorShortName(StringConcatenate("QQE(", SF, ")"));
return(0);
}
//+------------------------------------------------------------------+
//| |
//+------------------------------------------------------------------+
int start()
{
int counted, i;
double rsi0, rsi1, dar, tr, dv;
//----
if(Bars<=StartBar)
return(0);
//----
counted=IndicatorCounted();
if(counted < 1)
for(i=Bars - StartBar; i < Bars; i++)
{
TrLevelSlow=0.0;
AtrRsi=0.0;
MaAtrRsi=0.0;
Rsi=0.0;
RsiMa=0.0;
}
counted=Bars - counted - 1;
//----
for(i=counted; i>=0; i--)
Rsi=iRSI(NULL, 0, RSI_Period, PRICE_CLOSE, i);
for(i=counted; i>=0; i--)
{
RsiMa=iMAOnArray(Rsi, 0, SF, 0, MODE_EMA, i);
AtrRsi=MathAbs(RsiMa[i + 1] - RsiMa);
}
for(i=counted; i>=0; i--)
MaAtrRsi=iMAOnArray(AtrRsi, 0, Wilders_Period, 0, MODE_EMA, i);
i=counted + 1;
tr=TrLevelSlow;
rsi1=iMAOnArray(Rsi, 0, SF, 0, MODE_EMA, i);
while(i > 0)
{
i--;
rsi0=iMAOnArray(Rsi, 0, SF, 0, MODE_EMA, i);
dar=iMAOnArray(MaAtrRsi, 0, Wilders_Period, 0, MODE_EMA, i) * 4.236;
dv=tr;
if (rsi0 < tr)
{
tr=rsi0 + dar;
if (rsi1 < dv)
if (tr > dv)
tr=dv;
}
else if (rsi0 > tr)
{
tr=rsi0 - dar;
if (rsi1 > dv)
if (tr < dv)
tr=dv;
}
TrLevelSlow=tr;
rsi1=rsi0;
}
//----
return(0);
}
//+------------------------------------------------------------------+
bsivakumar913
Nothing
krishenterpriseshyd
Super indicater
azharhayat1986
Hh
hunasr15
good vrey vrey
AlpeshParekh
Gh
更多