Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Prevent plotting session jumps

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Prevent plotting session jumps

    Hi,

    I was wondering how I would be able to prevent an overlay indicator line to draw between sessions. So right now I have a line that jumps between sessions. I would be nicer if it just ends end the end of a session and then draws a new line at the beginning of a new session. In stead of trying to continue drawing which makes the session-breaks jump the line vertically.

    Thanks.

    #2
    siroki, are those plots currently? Then for example you could look into changing the style to a dot or hash that would not be connecting the segments, like a line or square style would in contrast.

    Comment


      #3
      Just set the color for the first bar of the session to transparent, if the plot style is line or square. Here is are some line applied to the first plot Plots[0].

      Code:
      #region Variables
            .....
            private bool drawGap = false;
            .....
      #endregion
      
      protected override void OnStartUp()
      {
                 .....
                 drawGap = (Plots[0].PlotStyle == PlotStyle.Line) || (Plots[0].PlotStyle == PlotStyle.Square);
      }
      
      protected override void OnBarUpdate()
      {
                 .....
                 if (drawGap & Bars.FirstBarOfSession)
                             PlotColors[0][0] = Color.Transparent; 
      }

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      578 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      334 views
      1 like
      Last Post Geovanny Suaza  
      Started by Mindset, 02-09-2026, 11:44 AM
      0 responses
      101 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by Geovanny Suaza, 02-02-2026, 12:30 PM
      0 responses
      554 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      551 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X