Hello Everyone,
I've been a reader and user of useThinkScript for quite some time, thank you all for your collaborations it really helps. The work and the ideas are phenomenal in this community.
I would like to see if its possible to get assistance on creating a SMA stack scanner utilizing the 8, 21, 34, 55, 89, 100 and 200 period SMA's. I've been trying to use the moving average scan and try build from there.
see below code;
If it can be done also with EMA's Stack.
Any help will be appreciated.
Thank you.
I've been a reader and user of useThinkScript for quite some time, thank you all for your collaborations it really helps. The work and the ideas are phenomenal in this community.
I would like to see if its possible to get assistance on creating a SMA stack scanner utilizing the 8, 21, 34, 55, 89, 100 and 200 period SMA's. I've been trying to use the moving average scan and try build from there.
see below code;
Code:
input price = close;
input lenght1 = 8;
input lenght2 = 21;
input lenght3 = 34;
input lenght4 = 55;
input lenght5 = 89;
input lenght6 = 100;
input lenght7 = 200;
input averageType1 = AverageType.Simple;
input averageType2 = AverageType.Simple;
input averageType3 = AverageType.Simple;
input averageType4 = AverageType.Simple;
input averageType5 = AverageType.Simple;
input averageType6 = AverageType.Simple;
input averageType7 = AverageType.Simple;
input percentdiff = 0;
def avg1 = movingAverage(averageType1,price,lenght1);
def avg2 = movingAverage(averageType2,price,lenght2);
def avg3 = movingAverage(averageType3,price,lenght3);
def avg4 = movingAverage(averageType4,price,lenght4);
def avg5 = movingAverage(averageType5,price,lenght5);
def avg6 = movingAverage(averageType6,price,lenght6);
def avg7 = movingAverage(averageType7,price,lenght7);
plot scan = close >= avg1 > avg2 > avg3 > avg4 > avg5 > avg6 > avg7 >(1 + percentdiff / 100 );
If it can be done also with EMA's Stack.
Any help will be appreciated.
Thank you.