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

    #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

    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.
      Brandon H.NinjaTrader Customer Service

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by zacharydw00, Today, 11:13 PM
      0 responses
      2 views
      0 likes
      Last Post zacharydw00  
      Started by luxurious_04, Today, 10:55 PM
      0 responses
      1 view
      0 likes
      Last Post luxurious_04  
      Started by timmbbo, Today, 10:27 PM
      0 responses
      4 views
      0 likes
      Last Post timmbbo
      by timmbbo
       
      Started by 7robert, Today, 07:48 PM
      1 response
      14 views
      0 likes
      Last Post NinjaTrader_EricB  
      Started by saltminer, Today, 06:32 PM
      0 responses
      6 views
      0 likes
      Last Post saltminer  
      Working...
      X