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

get last update in indicator?

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

    get last update in indicator?

    Is there a quick way to get the last indicator update so we can compare with the current indicator update? This is not to be confused with last value on bar, which could be 1min, 5 min, but rather the very last update (calculate on each tick).

    SMA[1] vs SMA[0], that would be comparing the last update on the last bar (if data series is 1min, would be value 1min ago) instead of last update (if using calculate on each tick)

    or is it the case that if you have calculate set to calculate on each tick, that the SMA[1] is the value updated on the last tick?
    Last edited by Boonfly8; 08-06-2018, 12:08 PM.

    #2
    Hello Boonfly8,

    Thank you for the post.

    When you are using OnBarClose calculations, what you have described is true or that the [0] would be the last Closed bar value and [1] would be prior to that.

    When using OnEachTick, the [0] would be the Building bars value that is currently changing. Comparing the [0] to [1] when using OnEach Tick would do as you want or compare the current ticks value versus the value of the last closed bar.

    I look forward to being of further assistance.
    JesseNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by PaulMohn, Today, 12:36 PM
    1 response
    12 views
    0 likes
    Last Post NinjaTrader_Gaby  
    Started by yertle, Yesterday, 08:38 AM
    8 responses
    36 views
    0 likes
    Last Post ryjoga
    by ryjoga
     
    Started by rdtdale, Today, 01:02 PM
    1 response
    5 views
    0 likes
    Last Post NinjaTrader_LuisH  
    Started by alifarahani, Today, 09:40 AM
    3 responses
    17 views
    0 likes
    Last Post NinjaTrader_Jesse  
    Started by RookieTrader, Today, 09:37 AM
    4 responses
    19 views
    0 likes
    Last Post RookieTrader  
    Working...
    X