Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Bug report, Strategy IDataSeries changed by Indicator

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

    Bug report, Strategy IDataSeries changed by Indicator

    Hi Ninja,
    re the NT7 beta thread here http://www.ninjatrader.com/support/f...ight=saltminer
    I can confirm the cause.

    To summarise, Closes[0][0] in a strategy is returning Typicals[0][0].
    After much testing, I traced it to an indicator the strategy was calling, in the form
    value = MyIndicator(Closes[0], ....)[0];

    The indicator had the following lines in the Initialise()
    PriceTypeSupported = true;
    PriceType = PriceType.Typical;

    This corrupted the strategy somehow, changing the strategy's Closes forever after into Typicals.
    This would not be intended NinjaTrader behaviour. It did not occur in Ninja 6.5 with identical code.

    Cheers,
    saltminer

    #2
    saltminer,

    This was never a supported usage model. If you want to sync the indicator to a different Bars object you need to use BarsArray[].

    For example:
    someValue = MyIndicator(BarsArray[1], 20)[0];

    Please see attached reference if you wanted to be working with price type. The indicator itself is one of Typical. The print outs demonstrate how to get it on the High prices instead.
    Attached Files
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      Thanks

      Thanks Josh.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      647 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      368 views
      1 like
      Last Post Geovanny Suaza  
      Started by Mindset, 02-09-2026, 11:44 AM
      0 responses
      108 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by Geovanny Suaza, 02-02-2026, 12:30 PM
      0 responses
      571 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      573 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X