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

missing values in data window on tick charts



PureBytes Links

Trading Reference Links

Attached is a gif that has been reduced substantially to get posted to the
list.  It shows a 200 tick chart of the @ES.D symbol.  The indicator is a
stochastic with a slowK, slowD and zeroline (plotted on 50).

The Data Window on the bar selected shows only a value for the SloD and no
value for the SloK, when obviously there should be a value there.    Because
of this omission, the indicator plots a magenta dot when one one doesn't
belong.

While I don't think the problem is in the easylanguage code, I have printed
the code below:

Thanks.

Barry Silberman

==========================================================================
{stochastics per Perry Kaufman in "Trading Systems & Methods" pg 136
Added color dot for when the two lines cross and plotted it on the midpoint
line}

Inputs: length(13), length1(3), length2(3), upperlimit(80), lowerlimit(20),
dotsize(4);

Variable: FstK(0), SloK(0), SloD(0);

Value1 = Lowest(Low, Length);
Value2 = Highest(High, Length) - Value1;
Value3 = Close;

If Value2 > 0 Then
 FstK = (Value3 - Value1) / Value2 * 100
Else
 FstK = 0;

SloK = XAverage(FstK,length1);

SloD = Average(SloK, Length2);

Condition1  = sloK[1] < sloD[1] and sloK > sloD;
Condition11 = sloK[1] > sloD[1] and sloK < sloD;

If FstK > 0 Then
 plot1(sloK, "SloK");
    plot2(sloD, "SloD");

If condition1 and sloK < 50 then
 Plot3 (50,  "zeroline",  green,  default,  dotsize);

If condition1 and sloK > 50 then
 Plot3 (50,  "zeroline",  cyan,  default,  dotsize);

If condition11 and sloK > 50 then
 Plot3 (50,  "zeroline",  red,  default,  dotsize);

If condition11 and sloK < 50 then
 Plot3 (50,  "zeroline",  magenta,  default,  dotsize);

if condition1 = false and condition11 = false then
 Plot3 (50,  "zeroline",  white,  default,  dotsize-2);

Attachment:
missing data point-3.gif

Attachment: Description: "Description: GIF image"