byebyemoney 31 posts msg #144205 - Ignore byebyemoney |
7/25/2018 7:16:27 PM
Hello, I have a filter below that is advanced but would love to make basic. I've added comments to help navigate through the filter. Any help would be much appreciated
/*filter starts here*/
/*finds index of 10 day high for close*/
set{iupper1, days(close reached a new 10 day high, 10)}
/*finds index of 45 day high for close*/
set{iupper2, days(close reached a new 45 day high, 45)}
/*finds value of 10 day high of close*/
set{vupper1, varOffset(close, iupper1)}
/*finds value of 45 day high of close*/
set{vupper2, varOffset(close, iupper2)}
/*filters stocks where the 10 day high is lower than the 45 day high of the close*/
vupper2 is above vupper1
iupper1 is above -1
/*formula to find the value if a support line connected the ten day and the 45 day high and extending it to today would be*/
set{height1, vupper2-vupper1}
set{length1, iupper2-iupper1}
set{taninput, height1/length1}
set{theta, atan(taninput)}
set{height2, theta*iupper1}
set{supportlevel, vupper1-height2}
/*draws a line where that support level is*/
draw price line at supportlevel
/*filters stocks that have a close above this support line signaling breakout*/
close is above supportlevel
/*added columns to see values*/
add column vupper1
add column vupper2
add column height1
add column iupper1
add column iupper2
add column length1
add column theta
add column height2
add column supportlevel
do not draw vupper2
do not draw vupper1
do not draw iupper1
chart-length is 3 months
|