here is a simple resistance and support lines script, i use it for taking the 5 highest open interest in both calls and puts and then plot a dotted line on your chart. call1 and put1 has the thickest line. would love if someone could help make it automatic by pulling the 1week options and plotting the 5 highest open interest calls and puts. even better would be using the options volume, so its in real time.
Code:
def thickness1 = 5;
def thickness2 = 4;
def thickness3 = 3;
def thickness4 = 2;
def thickness5 = 1;
input call1 = 0.0;
plot call1a = call1;
call1a.SetDefaultColor(Color.GREEN);
call1a.SetStyle(Curve.SHORT_DASH);
call1a.SetLineWeight(thickness1);
input call2 = 0.0;
plot call2a = call2;
call2a.SetDefaultColor(Color.GREEN);
call2a.SetStyle(Curve.SHORT_DASH);
call2a.SetLineWeight(thickness2);
input call3 = 0.0;
plot call3a = call3;
call3a.SetDefaultColor(Color.GREEN);
call3a.SetStyle(Curve.SHORT_DASH);
call3a.SetLineWeight(thickness3);
input call4 = 0.0;
plot call4a = call4;
call4a.SetDefaultColor(Color.GREEN);
call4a.SetStyle(Curve.SHORT_DASH);
call4a.SetLineWeight(thickness4);
input call5 = 0.0;
plot call5a = call5;
call5a.SetDefaultColor(Color.GREEN);
call5a.SetStyle(Curve.SHORT_DASH);
call5a.SetLineWeight(thickness5);
input put1 = 0.0;
plot put1a = put1;
put1a.SetDefaultColor(Color.RED);
put1a.SetStyle(Curve.SHORT_DASH);
put1a.SetLineWeight(thickness1);
input put2 = 0.0;
plot put2a = put2;
put2a.SetDefaultColor(Color.RED);
put2a.SetStyle(Curve.SHORT_DASH);
put2a.SetLineWeight(thickness2);
input put3 = 0.0;
plot put3a = put3;
put3a.SetDefaultColor(Color.RED);
put3a.SetStyle(Curve.SHORT_DASH);
put3a.SetLineWeight(thickness3);
input put4 = 0.0;
plot put4a = put4;
put4a.SetDefaultColor(Color.RED);
put4a.SetStyle(Curve.SHORT_DASH);
put4a.SetLineWeight(thickness4);
input put5 = 0.0;
plot put5a = put5;
put5a.SetDefaultColor(Color.RED);
put5a.SetStyle(Curve.SHORT_DASH);
put5a.SetLineWeight(thickness5);