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

[amibroker] Changing BuyPrice in BarCount Loop



PureBytes Links

Trading Reference Links

I am having problems changing the buy, sell, short and cover prices 
inside a standard BarCount loop in a standard backtest (not a custom 
backtest).  This happens even when I set PriceBoundChecking to 
False.  I am using the BarCount loop to adjust my entries and exits 
by simply setting the Buy[bar], Sell[bar], Short[bar], and Cover[bar] 
values to zero or one.  All this logic works fine, but when I go to 
set the buy price using something like:

BuyPrice[bar] = Open[bar] * 1.0015;

it does not work.    It also does not work if I do this using the 
array method of:  BuyPrice = Open * 1.0015; in combination with a 
BarCount loop.

It also works fine in the pure array mode with NO BarCount loop.

Anyone have any ideas?

Thanks,

Dave