This is a discussion on AllAverages within the Trading tools forums, part of the Trading Forum category; Originally Posted by zilliq Another idea for the next version, Do you think it's possible to add the SSA of ...
Thanks newdigital,
Do you think that all ssa recalculating/repainting ?
If so, it isn't necessary to include it in the next version
Zilliq
Hi Igor,
An idea for the next 3.2 version : Add the nonlagMA 7.2 (you are the author right ?)
Have a nice day
Zilliq
Hi Igorad,
Plase can you post the formula of the correct version of the T3 (mode 24) (not the original), because I would code it on prorealtime
Thanks a lot and have a nice week-end
Zilliq
Thanks igorad,
Just to be sure, you replace period by
len=((period+5)/3)-1 or len=(period+5)/(3-1) ? (I think it's the first answer, but just to be sure
The code I use on prorealtime for the T3 is
price= customclose
x1=(exponentialaverage[period](price))*(1+vfactor)
x2=(exponentialaverage[period](exponentialaverage[period](price)))*vfactor
gd=x1-x2
x11=(exponentialaverage[period](gd))*(1+vfactor)
x21=(exponentialaverage[period](exponentialaverage[period](gd)))*vfactor
gd1=x11-x21
x12=(exponentialaverage[period](gd1))*(1+vfactor)
x22=(exponentialaverage[period](exponentialaverage[period](gd1)))*vfactor
gd2=x12-x22
Where period is the lengh on my code
So, the difference is only on the lengh with this "correct" version ?
Thanks a lot
Zilliq
The code on Prorealtime would be:
price= customclose
len = ((period + 5.0)/3)-1
if len < 1 then
len = 1
endif
vfactor=0.7
x1=(exponentialaverage[len](price))*(1+vfactor)
x2=(exponentialaverage[len](exponentialaverage[len](price)))*vfactor
gd=x1-x2
x11=(exponentialaverage[len](gd))*(1+vfactor)
x21=(exponentialaverage[len](exponentialaverage[len](gd)))*vfactor
gd1=x11-x21
x12=(exponentialaverage[len](gd1))*(1+vfactor)
x22=(exponentialaverage[len](exponentialaverage[len](gd1)))*vfactor
gd2=x12-x22
return gd2 as "T3 correct Tillson"
And here is the difference with period=5
In blue the "correct Tillson", and in red the "original Tillson"
The correct is faster but less smoother
Could you confirm the post above
Thanks a lot
Zilliq (coder on Prorealtime)
And if it isn't secret can you post the formula of the JSmooth because we haven't such a moving average on Prorealtime and I would code it for the community. Thanks a lot
Last edited by zilliq; 08-19-2013 at 11:10 AM.
Hi Zilliq,
Answers on your questions:
1. the 1st formula is OK.
2. I see issues in your code, because I guess the function exponentialaverage allows to enter only integer value for the EMA period. So you should allow to enter double values in this function.
3. About JSmooth:
Did you see the code for TradeStation? If not then please use following code for the JSmooth:
Regards,Code:{******************************************************************* Description : Jurik Smoothing Provided By : TrendLaboratory(c) Copyright 2008 Author : IgorAD E-mail: igorad2003@yahoo.co.uk ********************************************************************} Inputs: Price(NumericSeries), Period(NumericSimple), Pow(NumericSimple), Phase(NumericSimple), Opt(NumericSimple); Vars : bet(0.45*(Period-1)/(0.45*(Period-1)+2)),Filt0(0),alpha(0),Det0(0),Filt1(0),Det1(0),Filt2(0); If CurrentBar = Period then begin Filt0 = Price; Filt1 = Price; Filt2 = Price; end else begin alpha = power(bet,Pow); Filt0 = (1-alpha)*Price + alpha*Filt0[1]; Det0 = (Price - Filt0)*(1 - bet) + bet*Det0[1]; Filt1 = Filt0 + Phase*Det0; Det1 = (Filt1 - Filt2[1]) * power((1 - alpha),2) + alpha*alpha*Det1[1]; Filt2 = Filt2[1] + Det1; if Opt = 0 then JSmooth = Filt0; if Opt = 1 then JSmooth = Filt1; if Opt = 2 then JSmooth = Filt2; end;
Igor
Bookmarks