thomas2004ch
New member
Hi,
I want to get the number of the EMA5 crosses above EMA20 in the past 10 days for example. Here is my script. But it outputs 0. There must be something wrong.
I want to get the number of the EMA5 crosses above EMA20 in the past 10 days for example. Here is my script. But it outputs 0. There must be something wrong.
declare lower;
def MyEMA1 = expAverage(5);
def MyEMA2 = expAverage(15);
def CrossOver = MyEMA1 crosses above MyEMA2;
def MyCount = Sum(CrossOver, 10);
plot scan = MyCount;