protectedoverridevoid Initialize()
{
Add(new Line(Color.DarkCyan, PP, "MyPivot"));Add(new Line(Color.DarkCyan, R1, "MyR1"));Add(new Line(Color.DarkCyan, R2, "MyR2"));Add(new Line(Color.DarkCyan, R3, "MyR3"));
Add(new Line(Color.DarkCyan, S1, "MyS1"));Add(new Line(Color.DarkCyan, S2, "MyS2"));
Add(new Line(Color.DarkCyan, S3, "MyS3"));
}
protectedoverridevoid OnBarUpdate()
{
PreHigh = PriorDayOHLC().PriorHigh[0];
PreLow = PriorDayOHLC().PriorLow[0];
PreClose = PriorDayOHLC().PriorClose[0];
PP = (PreHigh + PreLow + PreClose) / 3;
R1 = 2 * PP - PreLow;
R2 = PP + (PreHigh - PreLow);
R3 = R1 + (PreHigh - PreLow);
S1 = 2 * PP - PreHigh;
S2 = PP - (PreHigh - PreLow);
S3 = S1 - (PreHigh - PreLow);
}
What i want is to plot the pivots at the values they equal. I would also like to add text on each line to label which one they are.
Comment