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

Remove Calculate On Bar Close

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

    Remove Calculate On Bar Close

    Hi,
    My script requires to set CalcuateOnBarClose to false and would not like to allow the end user to set it to true.

    Is there a way I can remove this from the user interface when end user right click into the indicator windows?

    Thanks in advance

    #2
    Hello ystan79,

    Thanks for your post.

    I am not aware of a means to remove it from the user interface however you can always set it after the user has changed it in OnBarUpdate().

    For example, on the first bar:

    if (CurrentBar == 0) CalculateOnBarClose = false;

    Everytime the script is loaded it will start on bar 0 and at that moment will be set to false (but obviously would not have impact until live data). If the user checks later they will see that it is set false in the user interface.

    You could also check to see if it is true in the OnStartUp() method and then set it to false.
    Paul H.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by AttiM, 02-14-2024, 05:20 PM
    11 responses
    184 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by fernandobr, Today, 09:11 AM
    1 response
    3 views
    0 likes
    Last Post NinjaTrader_Erick  
    Started by timmbbo, Today, 08:59 AM
    1 response
    3 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by KennyK, 05-29-2017, 02:02 AM
    2 responses
    1,281 views
    0 likes
    Last Post marcus2300  
    Started by itrader46, Today, 09:04 AM
    1 response
    6 views
    0 likes
    Last Post NinjaTrader_Clayton  
    Working...
    X