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

Re-dimension Close array to add next day closing price



PureBytes Links

Trading Reference Links

I am trying to re-dimension the Close array by increasing its size in 
order to add the next day closing price and calculating the next day 
signal using a built-in indicator that "Do Not Provide An Array 
Argument" (Hope someone at AmiBroker catches the hint). 
I've use a VB script to
function ReDimArray(ar,inc)
	redim Preserve ar(UBound(ar)+inc)
	ReDimArray=ar
end function
which works except when the size exceeds BarCount. 
The problem is getting AmiBroker to recognize an array size bigger 
then BarCount. I can move the data down and add my closing price to 
calc the signal but this causes me to miss the first interval buy/sell 
signal on the market open because a signal posts one interval late. 
Any suggestion would greatly be appreciated.