Hello,
I'm testing the Multicharts platform, And trying to create the "Preffered Stochastic" of DiNapoli. I apply in the power language editor the code in the book:
PreferredSlowK (Function)
Inputs: SlowKLen(Numeric), FastKLen(Numeric);
PreferredSlowK = PreferredSlowK[1] + ((1/SlowKLen)*(FastK(FastKLen) -
PreferredSlowK[l]));
PreferredSlowD (Function)
Input: FastKLen(Numeric), SlowKLen(Numeric), SlowDLen(Numeric);
PreferredSlowD = PreferredSlowD[1] + ((1/SlowDLen)*(PreferredSlowK(SlowKLen,
FastKLen)-PreferredSlowD[1]));
StochasticPreferred (Indicator)
Input: FastKLen(8), SlowKLen(3), SlowDLen(3);
Plot1(PreferredSlowK(SlowKLen, FastKLen), "%K");
Plot2(PreferredSlowD(FastKLen, SlowKLen, SlowDLen), "%D");
If CheckAlert then
begin
If Plot1 crosses above Plot2 or
Plot1 crosses below Plot2 then
Alert = TRUE;
end;
I passed the "compile" button, and everything is ok, but when I tried to put in a chart, there is an error message that says:
"Message: Error in study "StochasticPreferred": Not enough series length. Bars reference value: 1370"
I don't know where is the problem. I would thanks if someone knows what could I do.
I'm testing the Multicharts platform, And trying to create the "Preffered Stochastic" of DiNapoli. I apply in the power language editor the code in the book:
PreferredSlowK (Function)
Inputs: SlowKLen(Numeric), FastKLen(Numeric);
PreferredSlowK = PreferredSlowK[1] + ((1/SlowKLen)*(FastK(FastKLen) -
PreferredSlowK[l]));
PreferredSlowD (Function)
Input: FastKLen(Numeric), SlowKLen(Numeric), SlowDLen(Numeric);
PreferredSlowD = PreferredSlowD[1] + ((1/SlowDLen)*(PreferredSlowK(SlowKLen,
FastKLen)-PreferredSlowD[1]));
StochasticPreferred (Indicator)
Input: FastKLen(8), SlowKLen(3), SlowDLen(3);
Plot1(PreferredSlowK(SlowKLen, FastKLen), "%K");
Plot2(PreferredSlowD(FastKLen, SlowKLen, SlowDLen), "%D");
If CheckAlert then
begin
If Plot1 crosses above Plot2 or
Plot1 crosses below Plot2 then
Alert = TRUE;
end;
I passed the "compile" button, and everything is ok, but when I tried to put in a chart, there is an error message that says:
"Message: Error in study "StochasticPreferred": Not enough series length. Bars reference value: 1370"
I don't know where is the problem. I would thanks if someone knows what could I do.