priceClose() is a function and needs parentheses and the first arg to SMA is of type series. Example from the manual

Code

function run()
{
  vars Price = series(priceClose());
  vars SMA100 = series(SMA(Price,100));
  vars SMA30 = series(SMA(Price,30));
 
  if(crossOver(SMA30,SMA100))
    enterLong();
  else if(crossUnder(SMA30,SMA100))
    enterShort();
}


Last edited by strimp099; 02/17/21 13:54.