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

[amibroker] Learning VarSet/VarGet ( was Re: Learning Composites )



PureBytes Links

Trading Reference Links

--- In amibroker@xxxxxxxxxxxxxxx, "Joe Landry" <jelandry@xxx> wrote:
>
   There are persistent numbers and text 
> store AFL functions...
> VarSet VarGet for numbers and text.  These I understand will persist
from 
> routine to routine unless
> you close Amibroker.

-------------------------------

Hmmm.  Try the following code on a watchlist with > 1 symbol.  I don't
see evidence of persistence from VarSet/VarGet.

///////////////////////////////
Buy=Sell=0;
Filter=Status("barinrange");
AddColumn( C, "Close" );
fi		=	"%1.0f";
Trace = True;
Vname = "TestVar";

if ( i = VarGet( Vname ) )
{
	_TRACE( "got i = " + StrFormat( fi, i ) );
}
else
{
	_TRACE( "did not get a value for i from varget" );
	VarSet( Vname, 1 );
}
///////////////////////////////



Content-Description: "AVG certification"
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.409 / Virus Database: 268.13.27/517 - Release Date: 11/3/2006