• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

MR

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

    MR

    Hi,

    My name is Bruce.

    I would like to code and indicator that replicates the market price action at real time. I tried with a moving average; 1 period; which is the closest I can be from the real price action candle.
    Unfortunately is not working, and I do not know why. Is there any other option to do this?

    Maybe If I can use the same code from the price action in the tick chart I could add one moving average.

    Could you please provide your suggestion?

    Thank you very much in advance,
    Regards,
    Bruce
    Last edited by brucegale69; 06-14-2018, 03:15 AM.

    #2
    Hello brucegale69,

    Thanks for your post and welcome to the NinjaTrader forums!

    In NinjaTrader7 most indicators, by default, are run with CalculateOnBarClose = true which means that the indicator is calculated when the current bar closes (finishes) so it would not adjust "real time" while the bar is forming until the last tick of the bar.

    To provide a real-time response while the bar is forming, in the indicator panel of the selected indicator, you can change the CalculateOnBarClose from true to false. This setting of false will update the indicator on every incoming tick. This mode does use more of your CPU resources and should be used when needed and is why it is not set this way by default.

    Using an SMA period of 1 set to CalculateOnBarClose = false will be the current price. You can also change the "input series" in the indicator panel to change from the default "Close" data series to "High, Low, Median, Open, Typical, or weighted", so you can have an SMA calculate on the Low or High of the series.

    Reference information:
    https://ninjatrader.com/support/help...indicators.htm
    https://ninjatrader.com/support/help...onbarclose.htm
    Paul H.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by futurenick, Today, 06:26 AM
    1 response
    10 views
    0 likes
    Last Post nkhoi
    by nkhoi
     
    Started by NinjaCustomer, Today, 12:29 PM
    1 response
    6 views
    0 likes
    Last Post NinjaTrader_ShawnB  
    Started by Steve L, Today, 11:32 AM
    0 responses
    5 views
    0 likes
    Last Post Steve L
    by Steve L
     
    Started by prabbala, Today, 10:41 AM
    0 responses
    3 views
    0 likes
    Last Post prabbala  
    Started by bebbus, Today, 10:36 AM
    0 responses
    4 views
    0 likes
    Last Post bebbus
    by bebbus
     
    Working...
    X