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

[amibroker] How to refer to current array element?



PureBytes Links

Trading Reference Links

How do I refer to the current array element ..

For example, lets say I want to store the current bar number into a static var.
Static vars need a number, not an array 
So this fails ..

Blah = barindex();
StaticVarSet("MyVar", Blah);    // fails because blah is an array

What I want to do is 

Blah = barindex();

StaticVarSet("MyVar", Blah[????]);    

But I don't know what value to use for the '????' above to refer this 'nth' bar in the array. 

Don't want to use Lastvalue(blah) as it always returns the right edge last bar.   
tia ..wes


(fwiw, this is an attempt to fix the flip() issues when using RT feeds.  I'm trying to set a static var so that I know if the var has been triggered on this-bar...    Sure wish flip() would latch on the 1st occurance of the set variable, and not just at bar close. ) 





Content-Description: "AVG certification"
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.432 / Virus Database: 268.17.12/655 - Release Date: 1/28/2007 1:12 PM