Reply To: Script giving errant results – where did I go wrong?

Optuma Forums Optuma Scripting Script giving errant results – where did I go wrong? Reply To: Script giving errant results – where did I go wrong?

#67097
Mark
  • Topics: 4
  • Replies: 6
  • Posts: 10

I found some errors in my above scripts so this is my revised script (ignore the ones above). The script below is still producing some errant results, for example the scan identified the stock “NUE” today as having met the criteria, yet the 21 EMA on that chart is above the 8 EMA (so it should not have come up in the results), but this script is performing better, producing about 90%+ accurate results.

Can someone tell me where I’m going wrong on this one:

// 8EMA > 21EMA
c1 = MA(Bars=8, STYLE=Exponential, CALC=Close) > MA(Bars=21, STYLE=Exponential, CALC=Close);

// 21EMA > 34EMA
c2 = MA(Bars=21, STYLE=Exponential, CALC=Close) > MA(Bars=34, STYLE=Exponential, CALC=Close);

// 34EMA > 55EMA
c3 = MA(Bars=34, STYLE=Exponential, CALC=Close) > MA(Bars=55, STYLE=Exponential, CALC=Close);

// 55EMA > 89EMA
c4 = MA(Bars=55, STYLE=Exponential, CALC=Close) > MA(Bars=89, STYLE=Exponential, CALC=Close);

c5 = c1 and c2 and c3 and c4;

// 50MA>200MA
c6 = MA(Bars=50, CALC=Close) > MA(Bars=200, CALC=Close);

c5 and c6

Pin It on Pinterest