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 JonesJoker, 04-22-2024, 12:23 PM
      8 responses
      41 views
      0 likes
      Last Post JonesJoker  
      Started by timko, Today, 06:45 AM
      0 responses
      3 views
      0 likes
      Last Post timko
      by timko
       
      Started by Waxavi, 04-19-2024, 02:10 AM
      2 responses
      37 views
      0 likes
      Last Post poeds
      by poeds
       
      Started by chbruno, Yesterday, 04:10 PM
      1 response
      44 views
      0 likes
      Last Post NinjaTrader_Gaby  
      Started by Max238, Today, 01:28 AM
      1 response
      25 views
      0 likes
      Last Post CactusMan  
      Working...
      X