Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

A hosted indicator tried to load additional data - AddIndicator to chart

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

    A hosted indicator tried to load additional data - AddIndicator to chart

    Hi,

    I'm having an Error message "A hosted indicator tried to load additional data" when I add OrderFlowCumulativeDelta Indicator to strategy; How do I fix it?

    The code is as follows:

    Code:
    if (State == State.DataLoaded)
    			{
    				AddChartIndicator(OrderFlowCumulativeDelta(CumulativeDeltaType.BidAsk,CumulativeDeltaPeriod.Session,0));
    			}
    Code:
    protected override void OnBarUpdate()
    		{
    			if(CurrentBar <= 100) return;
    		}
    Attached is the full code.

    Thanks in advance.
    Attached Files

    #2
    Hello ricardo88,

    Thank you for your note.

    Because the OrderFlowCumulativeDelta adds a secondary tick series, your strategy would need to add this as well.

    You would have the following code in your strategy,

    else if (State == State.Configure)
    {
    Code:
    AddDataSeries("ES 06-18", BarsPeriodType.Tick, 1);
    }
    if (State == State.DataLoaded)
    {
    Code:
    AddChartIndicator(OrderFlowCumulativeDelta(CumulativeDeltaType.UpDownTick,CumulativeDeltaPeriod.Bar,0));
    }

    Please let us know if you need further assistance.
    Last edited by NinjaTrader_AlanP; 05-05-2018, 07:14 PM.
    Alan P.NinjaTrader Customer Service

    Comment


      #3
      Thanks for the reply AlanP, it worked as expected

      I'm trying to make AddDataSeries dynamic, I mean, OrderFlowCumulativeDelta load the instrument that I've selected in the chart instead of always loading the same instrument ("ES 06-18" with 610 tick bar).

      I'm trying with the next code but with no chance. I got the same Error: "A hosted indicator tried to load additional data..."

      Code:
      else if (State == State.Configure)
      			{
      				instrumento = this.Instrument.FullName.ToString();
      				periodo = BarsPeriods[0].Value;
      				AddDataSeries(instrumento,BarsPeriodType.Tick,periodo);
      			}
      Attached the full code. Thanks in advance.
      Attached Files

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by PaulMohn, Today, 03:49 AM
      0 responses
      3 views
      0 likes
      Last Post PaulMohn  
      Started by inanazsocial, Today, 01:15 AM
      1 response
      7 views
      0 likes
      Last Post NinjaTrader_Jason  
      Started by rocketman7, Today, 02:12 AM
      0 responses
      10 views
      0 likes
      Last Post rocketman7  
      Started by dustydbayer, Today, 01:59 AM
      0 responses
      2 views
      0 likes
      Last Post dustydbayer  
      Started by trilliantrader, 04-18-2024, 08:16 AM
      5 responses
      23 views
      0 likes
      Last Post trilliantrader  
      Working...
      X