Anyways, I am using this script to calculate the pivot levels for me. But it requires you going into edit studies and entering in the day high, low and close manually every night. As you can see, the code is almost identical to the last post, but this one allows you to put in the values in the edit studies screen.
input day_high = 0;
input day_low = 0;
input day_close = 0;
plot pivot = (day_high + day_low + day_close)/3;
pivot.SetDefaultColor(Color.YELLOW);
plot R1 = pivot * 2 - day_low;
R1.SetDefaultColor(Color.GREEN);
plot S1 = pivot * 2 - day_high;
S1.SetDefaultColor(Color.GREEN);
plot R2 = pivot + R1 - S1;
R2.SetDefaultColor(Color.LIGHT_GRAY);
R2.hide();
plot S2 = pivot - (R1-S1);
S2.SetDefaultColor(Color.LIGHT_GRAY);
S2.hide();
plot R3 = day_high + 2*(pivot-day_low);
R3.SetDefaultColor(Color.LIGHT_GREEN);
R3.hide();
plot S3 = day_low - 2*(day_high - pivot);
S3.SetDefaultColor(Color.LIGHT_GREEN);
S3.hide();
1 comment:
just found your site through google
dont you know that pivot points are already implemented in the software under studies -> pivot points?? so why rewrite it?
also it is possible to get the days high and low with a function... no need to manually type it....
Post a Comment