I'm having trouble getting TradeVar's to work. Can you please look at this code and tell me what I'm doing wrong?
Code:
int tmf(var v0)
{
	printf("\n\nTradePriceClose = %f",(var)TradePriceClose);
	printf("\nv0=%f",v0);
	printf("\nTradeVar[0] in tmf() = %f",TradeVar[0]);
	return 0;	
}


function run() 
{
	StartDate = 20140204;
	EndDate = 20140214;
	BarPeriod = 5;
	static int iteration;
	if (is(INITRUN)) iteration=0;
	
	enterLong(tmf,5.124);
	printf("\nTradeVar[0] in run() = %f",TradeVar[0]);

	if(iteration++ > 100) quit();
}



THANKS