[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [amibroker] Re: StochK? or StochD



PureBytes Links

Trading Reference Links

Hi,

You don't see the third line because two lines match perfectly
and one is covered by another. (Try to add 1 to one graph and you will see)

To remove histogram chart comment out the line:
/* Graph2 = MA( Graph1, 3 ); // calculated Slow Stoch %D */

Best regards,
Tomasz Janeczko
amibroker.com


----- Original Message -----
From: <MLRobb@xxxx>
To: <amibroker@xxxxxxxxxxxxxxx>
Sent: 22 October, 2001 08:16
Subject: [amibroker] Re: StochK? or StochD


-
Tomasz:

Thank you for clarifying Stochastic formulae for AFL.

I plotted your indicators as supplied in this previous post, and
found a display of two often intersecting indicator lines, one being
a presumed 3 unit, red colored, moving average of the other.

The black Stochastic line was ploted with histogram verticals as well
as linear Stochastic line of identical values.

I did not see a third Stochastic line ranging from 0 to 100 as hoped.

Could the histogram vertical lines be removed, and a third linear
representation of next 3 unit MA of prior Stochastic be added, so
that three intersecting 3 unit MA's of original Stochastic of
selected duration, may be viewed in indicator graph, within the 0 to
100 indicator display range.





-- In amibroker@xxxx, "Tomasz Janeczko" <amibroker@xxxx> wrote:
> Hello,
>
> Indeed there is some mess in literature about stochastics.
> I will describe the way the stochastic functions are calculated in
AmiBroker.
>
> Please note that StochK and StochD in AFL are "Slow stochastics"
they differ
> from "Fast stochastic" in that they are smoothed.
>
> So fast stochastic is calculated as follows:
> FASTSTOCHK = 100*(C-LLV(L,14))/(HHV(H,14)-LLV(L,14));
>
> This is so called Fast Stochastic %K line. Note that there is no
direct function in AFL for calculating fast stochastics.
>
> When we smooth the above function with period 3 MA we get Fast
stochastic %D
>
> FASTSTOCHD = MA( FastStochK, 3 );
>
> Then we arrive at "slow stochastics" -
>
> Slow Stochastic %K is THE SAME as Fast stochastic %D:
>
> SLOWSTOCHK = MA( FastStochK, 3 );
>
> This is exactly what StochK function returns.
>
> Then slow stochastic %D is smoothed again line:
>
> SLOWSTOCHD = MA( SLOWSTOCHK, 3 );
>
> You can check the following formula for reference:
>
> MaxGraph = 4;
>
>
>
> FASTSTOCHK = 100*(C-LLV(L,14))/(HHV(H,14)-LLV(L,14));
>
> Graph0 = SLOWSTK = MA( FastStochK, 3 ); // calculated Slow Stoch %K
>
> Graph1 = StochK( 14 ); // built in Slow Stoch %K
>
> Graph2 = MA( Graph1, 3 ); // calculated Slow Stoch %D
>
> Graph3 = StochD( 14 ); // built-in Slow Stoch %D
>
>
>
> Best regards,
> Tomasz Janeczko
> ===============
> AmiBroker - the comprehensive share manager.
> http://www.amibroker.com
>
> ----- Original Message -----
> From: saltyla1
> To: AMInewsgroup
> Sent: Saturday, October 20, 2001 9:22 PM
> Subject: [amibroker] StochK? or StochD
>
>
> Hello T.J. , and all,
> First, if any one has any reference to the proper calculation of
Stoch%K please post it.
> And, I'm no expert, but when I put one and one together,
something didn't add up. So, here it is;
> In the AFL Function reference it states that STOCHK has built in
(with internal slowing 3).
> STOCHK SYNTAX stochk( periods = 14 )
> RETURNS ARRAY
> FUNCTION Calculates the %K line of Stochastic Oscillator (with
internal slowing 3).
> EXAMPLE The formula "stochk( 5 )" returns the value of a 5-period
%K slowed down 3 periods.
> __________________________________________
> This is from the Window on Wall Street user guide;
> One must wonder why a smoothed component would have a different
name, but you should understand that %K is the primary indicator and %
D and %D slow are merely smoothed values of the original %K. In other
words, you could plot %K and then put a 3-day moving average of it on
the plot and that would be %D. The different types of Stochastic
Oscillators are as follows:
> Stochastic Oscillator (exponential)
> Stochastic Oscillator (simple)
> Stochastic Oscillator (weighted)
> __________________________________________
>
> In VarexList I saw this
> stochKw = StochK(13);
> and wondered if StochK(13) was really StochD(13) because of
StochK's internal slowing, meaning we don't really have a StochK at
all.
> And then I saw this
> stochDw = EMA( StochK(13), 3);
> and thought that Jaco was trying to slow a real StochK that
wasn't already slowed, to slowing with a moving average of his choice
in order to make a StochD using an EMA slowing. If StochK is already
slowed, then what Jaco has done is slowed a real StochD again.
> __________________________________________
> I think this StochD would be good if it is not based on a StochK
that is already slowed, but the reference should include a statement
as to what kind of slowing has been applied to it I.E.
(exponential,simple,weighted), so the user won't have to make an EMA(
StochK(13), 3) when that's what StochD is already using.
> STOCHD SYNTAX stochd( periods = 14 )
> RETURNS ARRAY
> FUNCTION Calculates the %D line of Stochastic Oscillator (with
internal slowing 3).
> EXAMPLE The formula "stochd( 5 )" returns the value of a 5-period
%D slowed down 3 periods.
> __________________________________________
> I was comparing graphs and using
> StochK
> was the same as using
> Stoch (Stoch with no K or D)
> Can you make one of these functions (StochK or Stoch) a StochK
with NO internal slowing?
> And, can you tell us if StochD is using an already slowed StochK
as reference for its calculations?
>
> Thankyou,
> Brian
>
>
> Yahoo! Groups Sponsor
>
>
>
> Your use of Yahoo! Groups is subject to the Yahoo! Terms of
Service.





Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/