Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How Calculate.OnPriceChange works

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

    How Calculate.OnPriceChange works

    When using the OnPriceChange mode, does Close[0] represent the current price and Open[0] represent the price of the open bar? Any clarification of this mode will be appreciated.

    #2
    Hello Lumbeezl,

    Thanks for your post.

    When using Calculate.OnBarClose, a barsAgo reference of 0 will represent the bar that had just closed. When using Calculate.OnEachTick or Calculate.OnPriceChange, a barsAgo reference of 0 will represent the developing bar. Close[0] will represent the current price and Open[0] would represent the Open of that developing bar.

    You can simulate Calculate.OnBarClose behavior by using a barsAgo reference under IsFirstTickOfBar.

    More information on barsAgo indexing, Calculate, and IsFirstTickOfBar is linked below.

    Working with Price Series - https://ninjatrader.com/support/help...ice_series.htm

    Calculate - https://ninjatrader.com/support/help.../calculate.htm

    IsFirstTickOfBar - https://ninjatrader.com/support/help...ttickofbar.htm

    Please let us know if you have any additional questions.
    JimNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by geddyisodin, Today, 05:20 AM
    3 responses
    20 views
    0 likes
    Last Post NinjaTrader_Gaby  
    Started by lorem, Today, 09:18 AM
    1 response
    4 views
    0 likes
    Last Post lorem
    by lorem
     
    Started by bmartz, Today, 09:30 AM
    0 responses
    3 views
    0 likes
    Last Post bmartz
    by bmartz
     
    Started by GussJ, 03-04-2020, 03:11 PM
    14 responses
    3,245 views
    0 likes
    Last Post GussJ
    by GussJ
     
    Started by ArkansasClint, Today, 09:28 AM
    0 responses
    0 views
    0 likes
    Last Post ArkansasClint  
    Working...
    X