Hello, I've written a basic script so I can manually enter weekly and monthly pivots to view on my intraday charts. I've tried the automatic ones and nothing shows up on the chart. anyway, I don't mind manually entering, but when I try to enter ES, NQ, or RTY values with decimals, the indicator truncates to integer values. No idea why. In the script I just put "100" for the prices as a placeholder and then I enter the real values into the field on the study dialog in the chart. I hope this makes sense. I just want to be able to enter the true pivot / R and S levels with decimals and have them remain and plot as decimals. Thanks so much.
Code:
# weekly pivot
input WeeklyPP = 100;
input WeeklyR1 = 100;
input WeeklyR2 = 100;
input WeeklyR3 = 100;
input WeeklyS1 = 100;
input WeeklyS2 = 100;
input WeeklyS3 = 100;
plot data1 = WeeklyPP;
plot data2 = WeeklyR1;
plot data3 = WeeklyR2;
plot data4 = WeeklyR3;
plot data5 = WeeklyS1;
plot data6 = WeeklyS2;
plot data7 = WeeklyS3;
data1.Setstyle(curve.MEDIUM_DASH);
data2.Setstyle(curve.MEDIUM_DASH);
data3.Setstyle(curve.MEDIUM_DASH);
data4.Setstyle(curve.MEDIUM_DASH);
data5.Setstyle(curve.MEDIUM_DASH);
data6.Setstyle(curve.MEDIUM_DASH);
data7.Setstyle(curve.MEDIUM_DASH);