De EL code van deze indicator geeft de editor een foutmelding. Kan iemand hier een oplossing voor geven?
Vr. Gr. Willie
Stochastic trend indicator
Using stochastic as a trend indicator requires that it be modified. Several well known charting programs package
it in this fashion so it is nothing new. Usually a 14 period %K and a 7 period %D is a good place to start.
It uses two functions as posted below. I'll send an ela if requested.Shorter periods produce a v
ery smooth oscillator and Using a longer %D than %k is also something worth looking at it produces
interesting crosses of K and D.
{Type : Function, Name : TAFastK }
Inputs: AvgLen(NumericSimple),Length(NumericSimple);
Value1 = Lowest(Average(Low,AvgLen),Length);
Value2 = Highest(Average(High,AvgLen),Length) - Value1;
Value3 = Average(Close,AvgLen);
if Value2 > 0 then
TAFastK ?= (Value3 - Value1) / Value2*100
else
TAFastK = 0;
{ Type : Function, Name : TAFastD }
Inputs: AvgLen(NumericSimple),Length(NumericSimple);
Vars: Factor(0);
if CurrentBar <=1
then begin
Factor = 2 / (3 + 1);
TAFastD = TAFastK(AVGLEN, LENGTH);
end
else
TAFastD = TAFastD[1] + (Factor * (TAFastK(AVGLEN,LENGTH) - TAFastD[1]));
?
{ Type : Indicator, Name : TAStoch Indicator }
Input: AvgLen(13), LengthK(5), LengthD(9);
Plot1 ( TAFastK(AVGLEN, LENGTHK),"TAK");
Plot2 ?(TAFastD(AVGLEN, LENGTHD),"TAD");
Plot3 (35,"BuyZone");
Plot4 (80,"SellZone");
?