Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Drawings from indicator invisible second dataseries

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

    Drawings from indicator invisible second dataseries

    Dear everyone,

    I've build an indicator with several drawings like:

    Draw.Line(this, Guid.NewGuid().ToString(), true, CurrentBar - idPast, indicatorPast, 0, indicatorPresence, Brushes.Red, DashStyleHelper.Dot, 1);


    This indicator should run on an second dataseries within a strategy.
    Therfore I've added an additional dataseries within a strategy:
    if (State == State.Configure)
    AddDataSeries(this.Instrument.FullName, BarsPeriodType.Minute, 10, Data.MarketDataType.Last);


    My Indicator is loaded via
    if (State == State.DataLoaded){

    myInd = MyIndicator(BarsArray[1]);
    AddChartIndicator(myInd);

    }


    The indicator with it's plotting is loaded and I can see the drawing lines.
    Unfortunately everything that is been drawed via Draw.* is not visible. When I load the indicator in the main dataseries as the strategy, the drawings are visible.

    Could anyone help to get the drawings visible?

    Thanks in advance.

    Cheers
    Airwave
    NinjaTrader Ecosystem Vendor - Airwave

    #2
    Hi all,

    I found out a major additional problem.

    It seems, that the additional-data-series is not been loaded if the chart selected period is lower than the requested one.

    Example:
    I open a chart with period of 30min. Than I add the strategy, that should add a dataseries of 10min (like in upper example).
    This seems to work, but the data seems to be not correct. (That seems to be the next problem).

    So, I opened a chart in 1min, but then the entire dataseries of 10min is not been loaded!
    E.g. the indicators "OnBarUpdate" section is also never been executed.

    Could anyone help, what I'm doing wrong?

    Thanks in advance.

    Cheers
    Airwave
    NinjaTrader Ecosystem Vendor - Airwave

    Comment


      #3
      Hello Airwave,

      Thank you for your post.

      If you would like to use a secondary series for the indicator's input, you would need to add the secondary series in the indicator itself as stated in the Notes section of the AddChartIndicator help guide documentation.

      An indicator being added via AddChartIndicator() cannot use any additional data series hosted by the calling strategy, but can only use the strategy's primary data series. If you wish to use a different data series for the indicator's input, you can add the series in the indicator itself and explicitly reference it in the indicator code (please make sure though the hosting strategy has the same AddDataSeries() call included as well)

      See the help guide documentation below for more information.
      AddChartIndicator - https://ninjatrader.com/support/help...tindicator.htm

      Let us know if we may assist further.
      Last edited by NinjaTrader_BrandonH; 05-17-2021, 08:31 AM.
      <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by NullPointStrategies, Today, 05:17 AM
      0 responses
      53 views
      0 likes
      Last Post NullPointStrategies  
      Started by argusthome, 03-08-2026, 10:06 AM
      0 responses
      130 views
      0 likes
      Last Post argusthome  
      Started by NabilKhattabi, 03-06-2026, 11:18 AM
      0 responses
      70 views
      0 likes
      Last Post NabilKhattabi  
      Started by Deep42, 03-06-2026, 12:28 AM
      0 responses
      44 views
      0 likes
      Last Post Deep42
      by Deep42
       
      Started by TheRealMorford, 03-05-2026, 06:15 PM
      0 responses
      49 views
      0 likes
      Last Post TheRealMorford  
      Working...
      X