The problem seems to be linked to the number of Plots.
When I use:
Code: Select all
Value0 = XAverage(Close, 100);
Value1 = WAverage(Value0, 100);
If Value1 > Value1[1] and Value1[1] < Value1[2] then begin
Plot1(High);
Plot2(Low);
end;
If Value1 < Value1[1] and Value1[1] > Value1[2] then begin
Plot1(High);
Plot2(Low);
end;
There is no error (shown in the attached screenshot).
But following code shows the same behaviour like the code posted earlier:
Code: Select all
Value0 = XAverage(Close, 100);
Value1 = WAverage(Value0, 100);
If Value1 > Value1[1] and Value1[1] < Value1[2] then begin
Plot3(High);
Plot4(Low);
end;
If Value1 < Value1[1] and Value1[1] > Value1[2] then begin
Plot5(High);
Plot6(Low);
end;