Posted By: maxwellreturn
make an array of series - 07/21/19 15:33
hi guys is it possible obtain something like this?
obviously it goes on error
thanks
Code
vars Price = series(priceClose()); var per = 50; int i = optimize(0,0,2,1); vars a[3] = { series(SMA(Price,per)), series(EMA(Price,per)), series(TEMA(Price,per)) }; vars Trends1 = a[i]; if(crossOver(Price,Trends1)) enterLong; if(crossUnder(Price,Trends1)) exitLong;
obviously it goes on error
thanks