hi, i want to add options open interest volume to my charts. i would like to be able to put the date of the options, total call volume, total put volume, call 1 (input highest open interest-thick green line), call 2 (input mid open interest-mid green thikness), call 3 (input low open interest-just a green line) and same with puts, but red line. this way i can see see where options thinks the support and resistance is. is it possible?
having issues with inputs (4 calls and 4 puts) also how to get script to select the options from my date input. would like it to thinken the line depending on the open interest volume for strike price i selected. also i want to remove the getsymbol and use the currect stock you have selected in the chart. here is what i got so far:
having issues with inputs (4 calls and 4 puts) also how to get script to select the options from my date input. would like it to thinken the line depending on the open interest volume for strike price i selected. also i want to remove the getsymbol and use the currect stock you have selected in the chart. here is what i got so far:
Ruby:
#input DateOfOption = date;
#input call1 = call1;
#input call2 = call2;
#input call3 = call3;
#input call3 = call4;
#input put1 = put1;
#input put2 = put2;
#input put3 = put3;
#input put3 = put4;
plot oi_call_1;
plot oi_call_2;
plot oi_call_3;
plot oi_call_4;
plot oi_put_1;
plot oi_put_2;
plot oi_put_3;
plot oi_put_4;
if (GetSymbol() == "TSLA")
{
oi_call_1 = call1;
oi_call_2 = call2;
oi_call_3 = call3;
oi_call_4 = call4;
oi_put_1 = put1;
oi_put_2 = put2;
oi_put_3 = put3;
oi_put_4 = put4;
} else
{
oi_call_1 = Double.NaN;
oi_call_2 = Double.NaN;
oi_call_3 = Double.NaN;
oi_call_4 = Double.NaN;
oi_put_1 = Double.NaN;
oi_put_2 = Double.NaN;
oi_put_3 = Double.NaN;
oi_put_4 = Double.NaN;
}
;
oi_call_1.SetDefaultColor(CreateColor(0, 236, 59));
oi_call_2.SetDefaultColor(CreateColor(0, 197, 49));
oi_call_3.SetDefaultColor(CreateColor(0, 158, 39));
oi_call_4.SetDefaultColor(CreateColor(0, 158, 29));
oi_call_1.SetLineWeight(5);
oi_call_2.SetLineWeight(4);
oi_call_3.SetLineWeight(3);
oi_call_4.SetLineWeight(2);
oi_put_1.SetDefaultColor(CreateColor(255, 17, 17));
oi_put_2.SetDefaultColor(CreateColor(255, 56, 56));
oi_put_3.SetDefaultColor(CreateColor(255, 56, 46));
oi_put_4.SetDefaultColor(CreateColor(213, 0, 0));
oi_put_1.SetLineWeight(5);
oi_put_2.SetLineWeight(4);
oi_put_3.SetLineWeight(3);
oi_put_4.SetLineWeight(2);
Last edited by a moderator: