Code: Select all
if (Time(0)<>PrevTime) then
begin
PrevTime := Time(0);
end
else
begin
exit;
end;
if (Bars <= (3*24*2)) then exit;
However, this doesn't seem to be working. I suspect that many ticks which should be filtered out are falling past this point -- executing a trade before my internally managed averages are adequatly preloaded with enough bars.
Also, the indicators that are referenced lower in the program are giving me the following error messages (for example):
Wrong Index In Buffer: 1 (Stochastic)
Wrong Index In Buffer: 2 (Stochastic)
Wrong Index In Buffer: 1 (RSI)
Wrong Index In Buffer: 2 (RSI)
Eventually, I stop getting these error messages and everything seems to work fine from that point on.
Any ideas as to what is causing this?