Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Ray draw

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

    Ray draw

    Hello there is a task to limit the rendering of the ray no further than 2 sessions forward how is it possible to do this?

    code


    Code:
    // use the current bar time to calculate the next session
    sessionIterator.GetNextSession(Times[1][1], true);
    
    // store the desired session information
    DateTime tradingDay = sessionIterator.ActualTradingDayExchange;
    DateTime beginTime = sessionIterator.ActualSessionBegin;
    DateTime endTime = sessionIterator.ActualSessionEnd;
    
    
    if (Condition1 && IsFirstTickOfBar)
    {
    
    Draw.Ray(this, "VOLUME1" + CurrentBar, false, 1, Open[0], 0, Open[0], Color1, LineStyle, LineWidth, true);
    
    }
    Last edited by memonolog; 02-09-2021, 08:32 AM.

    #2
    Hello memonolog, thanks for your post.

    The Ray drawing tool will always extend to the end of a chart. You should use the Line drawing tool to end the line at a defined spot. The Line drawing tool takes a start price and bar number and an end price and bar number. If you need to draw the line further past the right most bar, you would need to use the OnRender method to render the line into the future using SharpDX.

    Please let me know if I can assist any further.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    571 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    331 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
    549 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    549 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X