Originally Posted By: "Code"

function run()
{
BarPeriod = 60;
LookBack = 100;

TimeFrame = 24;
vars DailyClose = series(priceClose());
vars EMA50 = series(EMA(DailyClose,50));
vars EMA20 = series(EMA(DailyClose,20));

TimeFrame = 1;
Stop = 6.5*ATR(30);
TakeProfit = 9*ATR(30);

if ((*DailyClose > *EMA50) and (*DailyClose > *EMA20)
and (WillR(14) < -80))
enterLong();
else if ((*DailyClose < *EMA50) and (*DailyClose < *EMA20)
and (WillR(14) > -20))
enterShort();
}


For comparing a variable that is the target of the pointer, add a '*' to the pointer name, just as in the pointer definition. This way the variable can be directly read.

Hope this helps.