Hey guys -

Really loving Zorro so far.

Still a bit of a noob to coding, but thought I'd contribute where I can. Been transposing some indicators from tradingview. Any new ones I'll post here for your pleasure...

I cannot promise they are all perfect, but I will check them before I post them. However, on the brightside, most of them probably couldn't be too much worse...

anyways.. first one for you. QQE. Feel free to make the code much better. This is basically just two RSI's for all the hype it gets.

//default smoothing factor 5. Default len = 14.
var QQEF(var * src, var len, var smooth)
{

vars RSI = series(RSI(src, len));
vars RSII = series(EMA(RSI, smooth));

return RSII[0];
}
var QQES(var * src, var len, var smooth)
{

vars RSI = series(RSI(src, len));
vars RSII = series(EMA(RSI, smooth));
var tr = abs(RSII[0] - RSII[1]);
var wwalpha = (1/len);
var wwMI = wwalpha * tr + (1 - wwalpha);
vars WwMII = series(wwMI);
var WWMI = WwMII[0] * WwMII[1];
var atrrsi = wwalpha*WWMI + (1-wwalpha);
vars Atrrsi = series(atrrsi);
var ATRRSI = Atrrsi[0] * Atrrsi[1];

var QUP = RSII[0] + ATRRSI * 4.236;
var QDN = RSII[0] - ATRRSI * 4.236;

vars QQES = series(0.00);


QQES[0] = QQES[1];

if (QUP < QQES[1])
QQES[0] = QUP;
if (RSII[0] > QQES[1] && RSII[1] < QQES[1])
QQES[0] = QDN;
if (QDN > QQES[1])
QQES[0] = QDN;
if (RSII[0] < QQES[1] && RSII[1] > QQES[1])
QQES[0] = QUP;



return QQES[0];
}

Last edited by Bennycjones; 04/01/21 01:29.