Originally Posted by Sparrow PYenner: the xpMA 4 and 5 settings are actually the other way around if you look at the implementation |
Sparrow
Thank you, it looks like you are right but I'm not going to mess with it for now.
Users of xpMA be warned.
Sparrow, if you are also familiar with T3 this might be a simple question for you, if not just ignore it because I'm being lazy and looking for a quick fix.
I suspect that T3 was intended to use a sequence of ema's but a version I am looking at has used a variable where an array should have been used if ema's were the intended result. The difference is that arrays will work fine on both bars and ticks, but a variable will malfunction on live ticks.
This is what the code using variables looks like and cci[i] is supposed to end up holding a T3 version of a cci input signal. Would e1[i], e2[i] etc make more sense...? W1 and W2 weightings are ema type weightings eg (n-1) and n.
for(int i = Bars - 1; i >= 0; i--)
{
cci[i] = iCCI(NULL, 0, CCI_Period, PRICE_TYPICAL, i);
e1 = w1*cci[i] + w2*e1;
e2 = w1*e1 + w2*e2;
e3 = w1*e2 + w2*e3;
e4 = w1*e3 + w2*e4;
e5 = w1*e4 + w2*e5;
e6 = w1*e5 + w2*e6;
cci[i] = c1*e6 + c2*e5 + c3*e4 + c4*e3;
I am new to just about everything so I will lean on an experienced shoulder if I can. Don't bust a gut on it, just answer if its obvious to you.
Cheers
Lazy PYenner