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 martin70, 03-24-2023, 04:58 AM
    14 responses
    105 views
    0 likes
    Last Post martin70  
    Started by TraderBCL, Today, 04:38 AM
    0 responses
    2 views
    0 likes
    Last Post TraderBCL  
    Started by Radano, 06-10-2021, 01:40 AM
    19 responses
    606 views
    0 likes
    Last Post Radano
    by Radano
     
    Started by KenneGaray, Today, 03:48 AM
    0 responses
    4 views
    0 likes
    Last Post KenneGaray  
    Started by thanajo, 05-04-2021, 02:11 AM
    4 responses
    470 views
    0 likes
    Last Post tradingnasdaqprueba  
    Working...
    X