Untitled
user_8870758
plain_text
a year ago
599 B
216
Indexable
//@version=5
indicator("67% and 50% Fall from ATH", overlay=true)
// Calculate the all-time high (ATH)
var float ath = na
if high > ath or na(ath)
ath := high
// Calculate the 67% and 50% levels from ATH
var float level67 = na
var float level50 = na
if not na(ath)
level67 := ath * 0.33 // 67% fall from ATH
level50 := ath * 0.50 // 50% fall from ATH
// Plotting the levels
plot(ath, color=color.red, linewidth=2, title="All-Time High")
plot(level67, color=color.green, linewidth=2, title="67% Fall from ATH")
plot(level50, color=color.blue, linewidth=2, title="50% Fall from ATH")
Editor is loading...
Leave a Comment