if(BarsInProgress == 0) // draw pivots on primary bars in progress
{
if(this.indPivAverage.ExtrnTrend[0] == 1)
{
DrawLine("r2l" + sessionCount, false, Bars.BarsSinceSession, Math.Max(r2 + entryAllowance * TickSize, r2 + (r3 - r2)*0.25) , 0 , Math.Max(r2 + entryAllowance * TickSize, r2 + (r3 - r2)*0.25) ,Color.Orange,DashStyle.DashDotDot,1);
DrawLine("r1l" + sessionCount, false, Bars.BarsSinceSession, Math.Max(r1 + entryAllowance * TickSize, r1 + (r2 - r1)*0.25) , 0 , Math.Max(r1 + entryAllowance * TickSize, r1 + (r2 - r1)*0.25) ,Color.Orange,DashStyle.DashDotDot,1);
DrawLine("ppl" + sessionCount, false, Bars.BarsSinceSession, Math.Max(pp + entryAllowance * TickSize, pp + (r1 - pp)*0.25) , 0 , Math.Max(pp + entryAllowance * TickSize, pp + (r1 - pp)*0.25) ,Color.Orange,DashStyle.DashDotDot,1);
DrawLine("s1l" + sessionCount, false, Bars.BarsSinceSession, Math.Max(s1 + entryAllowance * TickSize, s1 + (pp - s1)*0.25) , 0 , Math.Max(s1 + entryAllowance * TickSize, s1 + (pp - s1)*0.25) ,Color.Orange,DashStyle.DashDotDot,1);
DrawLine("s2l" + sessionCount, false, Bars.BarsSinceSession, Math.Max(s2 + entryAllowance * TickSize, s2 + (s1 - s2)*0.25) , 0 , Math.Max(s2 + entryAllowance * TickSize, s2 + (s1 - s2)*0.25) ,Color.Orange,DashStyle.DashDotDot,1);
DrawLine("s3l" + sessionCount, false, Bars.BarsSinceSession, Math.Max(s3 + entryAllowance * TickSize, s3 + (s2 - s3)*0.25) , 0 , Math.Max(s3 + entryAllowance * TickSize, s3 + (s2 - s3)*0.25) ,Color.Orange,DashStyle.DashDotDot,1);
}
if(this.indPivAverage.ExtrnTrend[0] == -1)
{
DrawLine("r3s" + sessionCount, false, Bars.BarsSinceSession, Math.Min(r3 - entryAllowance * TickSize, r3 - (r3 - r2)*0.25) , 0 , Math.Min(r3 - entryAllowance * TickSize, r3 - (r3 - r2)*0.25) ,Color.Orange,DashStyle.DashDotDot,1);
DrawLine("r2s" + sessionCount, false, Bars.BarsSinceSession, Math.Min(r2 - entryAllowance * TickSize, r2 - (r2 - r1)*0.25) , 0 , Math.Min(r2 - entryAllowance * TickSize, r2 - (r2 - r1)*0.25) ,Color.Orange,DashStyle.DashDotDot,1);
DrawLine("r1s" + sessionCount, false, Bars.BarsSinceSession, Math.Min(r1 - entryAllowance * TickSize, r1 - (r1 - pp)*0.25) , 0 , Math.Min(r1 - entryAllowance * TickSize, r1 - (r1 - pp)*0.25) ,Color.Orange,DashStyle.DashDotDot,1);
DrawLine("pps" + sessionCount, false, Bars.BarsSinceSession, Math.Min(pp - entryAllowance * TickSize, pp - (pp - s1)*0.25) , 0 , Math.Min(pp - entryAllowance * TickSize, pp - (pp - s1)*0.25) ,Color.Orange,DashStyle.DashDotDot,1);
DrawLine("s1s" + sessionCount, false, Bars.BarsSinceSession, Math.Min(s1 - entryAllowance * TickSize, s1 - (s1 - s2)*0.25) , 0 , Math.Min(s1 - entryAllowance * TickSize, s1 - (s1 - s2)*0.25) ,Color.Orange,DashStyle.DashDotDot,1);
DrawLine("s2s" + sessionCount, false, Bars.BarsSinceSession, Math.Min(s2 - entryAllowance * TickSize, s2 - (s2 - s3)*0.25) , 0 , Math.Min(s2 - entryAllowance * TickSize, s2 - (s2 - s3)*0.25) ,Color.Orange,DashStyle.DashDotDot,1);
}
}
however on somedays it is plotting both above and below the pivots and some days not plotting at all.I have gone though a debug with visual studio and it is processing as I expected, so im not sure why this is happening?
When I eliminate all other draw items it still wont draw?
Comment