Central Pivot Range
Central Pivot Range
//Colors
cprColor = color.blue
rColor = color.green
sColor = color.red
phColor = color.navy
plColor = color.maroon
//Fill Transparency
fTransp = 99
//Switches
switch1 = input(title="DAILY CPR", type=input.bool, defval=true)
switch6 = input(title="PREVIOUS DAY HIGH & LOW", type=input.bool, defval=true)
//Resistance Levels
R1 = P * 2 - L
R2 = P + H - L
R3 = H + 2 * (P - L)
R4 = R3 + R2 - R1
//Support Levels
S1 = P * 2 - H
S2 = P - (H - L)
S3 = L - 2 * (H - P)
S4 = S3 - (S1 - S2)
//Cpr Alert
cprlong=crossover(close,R1)
cprshort=crossunder(close,S1)