Moving Average Slope Indicator
I was wondering if it would be possible to color a moving average based on its slope. Maybe coloring the segment of the line blue when the slope is positive and red or something when the slope is negative. I have no coding ability, so any help or insight would be appreciated.
-
Aloha! I tried a color change on the plot to see what happens and it looks a bit gnarly - there are breaks in the line and it's thicker than the width in settings. Wondering if someone from Tradovate can weigh in on if this is "as designed", or tips on the code to use?

Relevant code below:
return {
value,
style: {
value: {
color: value > priorValue ? 'green' : 'red'
}
}
}
Please sign in to leave a comment.
Comments
4 comments