PureBytes Links
Trading Reference Links
|
You may want to consider the outcome before you go through the effort.
First you are starting with a lagging indicator then smoothing its successors and components 5 times. By that time, as an oscillator, it has significantly reduced trading value.
--- In amibroker@xxxxxxxxxxxxxxx, "chanlai61" <chanlai61@xxx> wrote:
>
> Thank you.
>
> ---------------
> Function
>
> Inputs: TCLen(NumericSimple), MA1(NumericSimple), MA2(NumericSimple);
> Variables: XMac(0), Frac1(0), PF(0), PFF(0), Frac2(0), Factor(.5);
> {Calculate a MACD Line}
> XMac = MACD(c,MA1,MA2) ;
> {1st Stochastic: Calculate Stochastic of a MACD}
> Value1 = Lowest(XMac, TCLen);
> Value2 = Highest(XMac, TCLen) - Value1;
> {%FastK of MACD}
> Frac1 = IFF(Value2 > 0, ((XMac - Value1) / Value2) * 100, Frac1[1]);
> {Smoothed calculation for %FastD of MACD}
> PF = IFF(CurrentBar<=1, Frac1, PF[1] + (Factor * (Frac1 - PF[1])));
> {2nd Stochastic: Calculate Stochastic of Smoothed Percent FastD, `PF', above.}
> Value3 = Lowest(PF, TCLen);
> Value4 = Highest(PF, TCLen) - Value3;
> {%FastK of PF}
> Frac2 = IFF(Value4 > 0, ((PF - Value3) / Value4) * 100, Frac2[1]);
> {Smoothed calculation for %FastD of PF}
> PFF = IFF(CurrentBar<=1, Frac2, PFF[1] + (Factor * (Frac2 - PFF[1])));
> {The STC function is the %FastD of PF}
> _SchaffTC= PFF;
> ---------------------
>
> Indicator:
>
>
> Inputs: TCLen(10), MA1(23), MA2(50);
> plot1(_SchaffTC(TCLen,MA1,MA2),"Schaff_TLC");
> plot2(25);
> plot3(75);
>
------------------------------------
**** IMPORTANT PLEASE READ ****
This group is for the discussion between users only.
This is *NOT* technical support channel.
TO GET TECHNICAL SUPPORT send an e-mail directly to
SUPPORT {at} amibroker.com
TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)
For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/amibroker/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/amibroker/join
(Yahoo! ID required)
<*> To change settings via email:
mailto:amibroker-digest@xxxxxxxxxxxxxxx
mailto:amibroker-fullfeatured@xxxxxxxxxxxxxxx
<*> To unsubscribe from this group, send an email to:
amibroker-unsubscribe@xxxxxxxxxxxxxxx
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|