hello, i am trying to create this indicator but this part of the code is not recognized => “Plot1(HighJump, “High Jump”, color.red)”
any idea anyone? thanks
// High Jump Indicator
// Calculates the percentage distances from the high price to the 17, 50, and 200 day moving averages.
period17 = 17
period50 = 50
period200 = 200
// Calculate the moving averages
MA17 = Average[period17](Close)
MA50 = Average[period50](Close)
MA200 = Average[period200](Close)
// Calculate the percentage distance from the high price to each moving average
dist17 = (High – MA17) / MA17 * 100
dist50 = (High – MA50) / MA50 * 100
dist200 = (High – MA200) / MA200 * 100
// High Jump Indicator is the sum of the distances
HighJump = dist17 + dist50 + dist200
// Plot the High Jump Indicator (using Plot1)
Plot1(HighJump, “High Jump”, color.red)
// Optionally, you can add a threshold line to indicate when the stock might be over-extended
threshold = 10 // Example threshold for caution flag
Plot2(threshold, “Threshold”, color.green)