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 Hwop38, 05-04-2026, 07:02 PM
      0 responses
      164 views
      0 likes
      Last Post Hwop38
      by Hwop38
       
      Started by CaptainJack, 04-24-2026, 11:07 PM
      0 responses
      318 views
      0 likes
      Last Post CaptainJack  
      Started by Mindset, 04-21-2026, 06:46 AM
      0 responses
      246 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by M4ndoo, 04-20-2026, 05:21 PM
      0 responses
      350 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Started by M4ndoo, 04-19-2026, 05:54 PM
      0 responses
      179 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Working...
      X