Day traders are interested in a moving average's slope because it provides a quick and easy way to identify the direction and strength of a short-term trend, allowing them to make informed decisions about entry and exit points based on the immediate momentum of the price action within a single trading day.
Key points about using a moving average slope for day trading:
When you save the scan (with whatever name you give it) you can select it from the studies then change the inputs to your preference (length or average type).
https://tickertape.tdameritrade.com...average-thinkscript-stock-momentum-tool-15190
Key points about using a moving average slope for day trading:
- Trend identification:
A steep upward slope indicates a strong uptrend, while a steep downward slope suggests a strong downtrend.
- Momentum signal:
The slope's change can signal shifts in momentum, allowing traders to react to potential trend reversals.
- Support and resistance:
Moving averages can act as dynamic support and resistance levels, with price often bouncing off the line, especially when the slope is changing.
- Timeframe suitability:
Day traders typically use shorter timeframes for their moving averages, allowing them to capture rapid price movements within a single trading session.
When you save the scan (with whatever name you give it) you can select it from the studies then change the inputs to your preference (length or average type).

https://tickertape.tdameritrade.com...average-thinkscript-stock-momentum-tool-15190
Ruby:
## Started on 2021.09.23
## MA Slope SCAN
##
##
## CREDITS
## Orignal source https://tickertape.tdameritrade.com/trading/cool-scripts-create-moving-average-thinkscript-stock-momentum-tool-15190
##
##
## Removing the header Credit credits and description is not permitted, any modification needs to be shared.
##
## V 1.0 : @cos251 - SCAN version of MA Slope
## :
input length = 20;
input price = close;
input averageType = AverageType.SIMPLE;
def avg = MovingAverage(averageType,price,length);
def height = avg - avg[1];
plot "Angle, deg" = Atan(height/length) * 180 / Double.Pi;
plot crossPositive = "Angle, deg" > 0 and "Angle, deg"[1] < 0;
plot crossNegative = "Angle, deg" < 0 and "Angle, deg"[1] > 0;
- UPDATED WITH AN ADDITIONAL EXAMPLE SCAN
Ruby:
## Started on 2021.09.23
## MA Slope SCAN
##
##
## CREDITS
## Orignal source https://tickertape.tdameritrade.com/trading/cool-scripts-create-moving-average-thinkscript-stock-momentum-tool-15190
##
##
## Removing the header Credit credits and description is not permitted, any modification needs to be shared.
##
## V 1.0 : @cos251 - SCAN version of MA Slope
## :
input length = 20;
input price = close;
input averageType = AverageType.SIMPLE;
def avg = MovingAverage(averageType,price,length);
def height = avg - avg[1];
plot "Angle, deg" = Atan(height/length) * 180 / Double.Pi;
plot crossPositive = "Angle, deg" > 0 and "Angle, deg"[1] < 0;
plot crossNegative = "Angle, deg" < 0 and "Angle, deg"[1] > 0;
# --- Example Near Zero but not greater
def approachZero = "Angle, deg" > "Angle, deg"[1] and "Angle, deg"[1] > "Angle, deg"[2] and "Angle, deg" > -.1 and "Angle, deg" < 0;
plot NearZeroUp = if approachZero then 1 else Double.NaN;
Last edited by a moderator: