• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

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.
    JesseNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by williamzz, Today, 11:37 AM
    1 response
    7 views
    0 likes
    Last Post Emma1
    by Emma1
     
    Started by thecashguys, Today, 10:18 AM
    0 responses
    6 views
    0 likes
    Last Post thecashguys  
    Started by pjsmith, Today, 09:58 AM
    0 responses
    8 views
    0 likes
    Last Post pjsmith
    by pjsmith
     
    Started by bebbus, Today, 09:13 AM
    0 responses
    6 views
    0 likes
    Last Post bebbus
    by bebbus
     
    Started by roblogic, Today, 08:04 AM
    0 responses
    7 views
    0 likes
    Last Post roblogic  
    Working...
    X