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 SalmaTrader, 07-07-2026, 10:26 PM
    0 responses
    54 views
    0 likes
    Last Post SalmaTrader  
    Started by CarlTrading, 07-05-2026, 01:16 PM
    0 responses
    25 views
    0 likes
    Last Post CarlTrading  
    Started by CaptainJack, 06-17-2026, 10:32 AM
    0 responses
    17 views
    0 likes
    Last Post CaptainJack  
    Started by kinfxhk, 06-17-2026, 04:15 AM
    0 responses
    23 views
    0 likes
    Last Post kinfxhk
    by kinfxhk
     
    Started by kinfxhk, 06-17-2026, 04:06 AM
    0 responses
    24 views
    0 likes
    Last Post kinfxhk
    by kinfxhk
     
    Working...
    X