nainil 10 posts msg #161504 - Ignore nainil |
12/21/2024 10:02:31 AM
Hi
Is there a way to add support & resistance lines? I’ve added the code but it’s for some reason not showing up.
/* Define variable for moving average period */
set{ma_period, 90}
/* Touched MA(period) then bounced above it */
low 2 days ago > ma(ma_period) 2 days ago
low 1 day ago < ma(ma_period) 1 day ago
close > open
close > close 1 day ago
close > ma(ma_period)
/* Limit the universe of tickers */
close > 10
average volume(30) > 100,000
/* Calculate Support and Resistance */
set{support, low 10 days ago}
set{resistance, high 10 days ago}
add column support {Support Level}
add column resistance {Resistance Level}
/* Sort by percentage gain close-to-close */
set{Pup1,close / close 1 day ago}
set{Pup2,Pup1 - 1}
set{Pup,Pup2 * 100}
add column Pup {Percentage up}
sort column 5 descending
/* Highlight Support and Resistance Levels */
draw resistance on price
draw support on price
draw ma(ma_period) on price
|