Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

YADQ (yet another dumb question)

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

    YADQ (yet another dumb question)

    Ok, so I can set CalculateOnBarClose to false to have ninjascript raise an OnBarUpdate for each tick, right? I can check the Historical flag to see if the bar is closed. Great. Now I want to get the value of tick of the current bar. There are High, Low, Open and Close collections for each bar but I don't see a Tick collection. How to tell what the "current" bar is trading at on a given call to OnBarUpdate?
    Thanks ... Ed

    #2
    Ed,

    If you use Close[0], it will get the last traded price in this scenario. When the update comes in the Close[0] will get updated to the last traded price.
    Cal H.NinjaTrader Customer Service

    Comment


      #3
      Very cool. Non-obvious, but cool. I'm on my way until the next dumb question!
      Thanks again ... Ed

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Mizzouman1, Today, 07:35 AM
      4 responses
      18 views
      0 likes
      Last Post Mizzouman1  
      Started by philmg, Today, 01:17 PM
      1 response
      6 views
      0 likes
      Last Post NinjaTrader_ChristopherJ  
      Started by cre8able, Today, 01:01 PM
      1 response
      7 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by manitshah915, Today, 12:59 PM
      1 response
      5 views
      0 likes
      Last Post NinjaTrader_Erick  
      Started by ursavent, Today, 12:54 PM
      1 response
      7 views
      0 likes
      Last Post NinjaTrader_Jesse  
      Working...
      X