Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

BarsArray question

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

    BarsArray question

    Here is what I would like to do and I have been trying to get it done for days now..

    I really need your help.

    I would like to give the opportunity to the users of my indicator to load Bid Ask or Minute data.

    I have created a property data which is an enumeration containing BidAsk and Minute.

    I have to set the data series in the initialize method. But when I run 1) Minute - 2) Bid Ask and 3) Minute again I get a Bar array error. It seems that the minute data is still there from the first run and try to add another minute data which cause the problem.

    Is there a way to start fresh and get rid of previous bar array before adding the needed array chosen by the user...

    Thanks

    #2
    Hi blar58,

    We only support hard coding additional series in the initialize() method. Hopefully other community members can assist with other approaches.
    Ryan M.NinjaTrader Customer Service

    Comment


      #3
      have u used the NT enum of MarketDataType

      this works for me

      in variable
      Code:
      MarketDataType dataType = MarketDataType.Last;
      in Initialize
      Code:
      Add("symbol name",PeriodType.Minute, periodValue,dataType);
      in property
      Code:
      [Description("")]
      [GridCategory("Parameters")]
      public MarketDataType DataType
      {
              get{return dataType;}
              set{dataType =value;}
      }

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      639 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      366 views
      1 like
      Last Post Geovanny Suaza  
      Started by Mindset, 02-09-2026, 11:44 AM
      0 responses
      107 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by Geovanny Suaza, 02-02-2026, 12:30 PM
      0 responses
      569 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      572 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X