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 charlesugo_1, 05-26-2026, 05:03 PM
      0 responses
      60 views
      0 likes
      Last Post charlesugo_1  
      Started by DannyP96, 05-18-2026, 02:38 PM
      1 response
      147 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 05-11-2026, 05:56 AM
      0 responses
      161 views
      0 likes
      Last Post CarlTrading  
      Started by CarlTrading, 05-10-2026, 08:12 PM
      0 responses
      97 views
      0 likes
      Last Post CarlTrading  
      Started by Hwop38, 05-04-2026, 07:02 PM
      0 responses
      284 views
      0 likes
      Last Post Hwop38
      by Hwop38
       
      Working...
      X