Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Stochastics K[1] returns a value of 0

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

    #16
    I don't get the "Until enough bars are processed".. What tells the computer to process old bars? Doesn't it just process the bar that is continuously being updated in a trading day when price changes?

    Is the computer processing all bars ever created in some historical database over and over, and discards them over and over, if they are not called for in the script, or what?

    Comment


      #17
      m96gran,

      The NinjaTrader core calls the old bars. Otherwise you wouldn't be able to do calculations with the historical data. This is also called backtest.

      When the script starts, NinjaTrader will call OnBarUpdate for every historical bar of data in order. The Historical bool will be true. After the last historical bar is processed, the Historical bool will be turned to false and then the script will start to process real-time bars.

      The script does not just process the continuously updated bar as it does process historical bars first, and then processes real-time bars.

      The script only processes the data loaded in the script (because thats what was loaded in the script) and processes this only once, before real-time data begins to be processed.

      Please see the help guide on the Historical bool.


      And on the differences between real-time and backtest.
      Last edited by NinjaTrader_ChelseaB; 10-25-2016, 07:09 AM.
      Chelsea B.NinjaTrader Customer Service

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by CaptainJack, 05-29-2026, 05:09 AM
      0 responses
      373 views
      0 likes
      Last Post CaptainJack  
      Started by CaptainJack, 05-29-2026, 12:02 AM
      0 responses
      241 views
      0 likes
      Last Post CaptainJack  
      Started by charlesugo_1, 05-26-2026, 05:03 PM
      0 responses
      205 views
      1 like
      Last Post charlesugo_1  
      Started by DannyP96, 05-18-2026, 02:38 PM
      1 response
      292 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 05-11-2026, 05:56 AM
      0 responses
      253 views
      0 likes
      Last Post CarlTrading  
      Working...
      X