Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Drawing Object on Added Data Series - Is it Possible?

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

    Drawing Object on Added Data Series - Is it Possible?

    Dear Support,

    When drawing an object (i.e. Draw.Line(), etc) on an added secondary data series, how the indexing for Draw.Line() is coded to make sure the object is drawn on the added data series plot and not the primary data series plot in the following:

    Code:
    Draw.Line(this, "EMUP", false, Index1, emup, Index2, emup, Brushes.Green, DashStyleHelper.Solid, 3);
    Using the "SampleSecondarySeriesAsAdddInputSeries" example for two instances of Swing indicator (Daily, and Weekly as AddedInput series), I want to draw a line connecting the last two high pivots at Index1 and Index2 on the Added Secondary Input Series.

    Thanks.

    #2
    Hello aligator,

    When using AddDataSeries, no additional series are visually added but the BarsAgo would represent the series calling OnBarUpdate. If you call the Draw syntax during one of the other BarsInProgress updates, the BarsAgo would relate to that series. If you are trying to draw on the primary series with a BarsAgo you would need to execute that logic from BarsInProgress 0.

    I cannot see any way this could be accomplished from the secondary series in relation to the primary as the series may not be identical intervals or time. 10 bars ago to the primary may mean a completely different point in the chart from the secondary series.

    Most commonly you would need to store this value from the secondary series and then plot it from the primary, or just access the secondary series value from the primary series: Closes[1][0] for example.

    I look forward to being of further assistance.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    577 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
    553 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