I have the following code that goes long or short when LeadSine crosses over or under SineWave.
function run()
{
set(LOGFILE);
asset("EUR/USD");
vars Prices = series(price());
vars SineWave = series(HTSine(Prices));
if(crossOver(rLeadSine, rSine)){
enterLong();
} else if(crossUnder(rLeadSine, rSine)){
enterShort();
}
}
However, zorro returns the following error:
crossOver(): Pointer expected
< if(crossOver(rLeadSine, rSine)){
>.
Is it because the rLeadSine and rSine are not series? Not sure how to proceed with this.