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

Reset to defaults

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

    Reset to defaults

    Ideas to possible fix an issue i have with a strategy using a bar type like a renko or range that is not time based. Some of my rules are re set the bar after exit or entry etc. If my exit is caused by end of session time setting and not by the strategies exits (which also reset some rules) AND their is No additional bar after the end of session exit the following occurs I believe.

    When new strategy enabled sometimes their will be no trading when testing Strategy Performance historical and if NO changes in settings will NOT trade any in real time. IF I change my day of data to load from 7 to 6 the strategy will backtest with results and will trade real time. SO MY THEORY IS that after a exit on end of session that their are no additional bars before end of day and that some of the required rules that need to be a default settings did not reset, thus rules are not in a tradable condition set. AS stated by simply changing the number of days to load (which changes the first bar of data) most times fixes the issue for the upcoming session to allow trading to begin.

    IS THERE A WAY (if so can this be done in Strategy Builder), a way to reset all variables to defaults settings in last minute of the current session, or on Start up of new strategy?

    Thanks

    #2
    Hello DTSSTS,

    Thank you for the post.

    Using the builder you can make a set to reset variables based on a condition, the last minute in the current session would not really be something the builder could do but you could watch for the first bar of the session. Om start up of a strategy will always run your defaults again so that would already be reset at that point.

    I look forward to being of further assistance.

    JesseNinjaTrader Customer Service

    Comment


      #3
      understand on first bar of session, which could be a secondary of 1 minute instead of waiting on a renko bar to close

      is there a universal to reset all variables (but not reset user input variables) that could be the action, or do i need to lest every variable one by one and equals what i have set in the defaults of those variables

      Thanks

      Comment


        #4
        Hello DTSSTS,

        There is not a universal method or function to reset the script variables but not the user inputs, the only universal reset would be re applying the script. If you need to reset something each day or at a specific interval you would have to add that as a condition.

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

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by bortz, 11-06-2023, 08:04 AM
        47 responses
        1,606 views
        0 likes
        Last Post aligator  
        Started by jaybedreamin, Today, 05:56 PM
        0 responses
        9 views
        0 likes
        Last Post jaybedreamin  
        Started by DJ888, 04-16-2024, 06:09 PM
        6 responses
        19 views
        0 likes
        Last Post DJ888
        by DJ888
         
        Started by Jon17, Today, 04:33 PM
        0 responses
        6 views
        0 likes
        Last Post Jon17
        by Jon17
         
        Started by Javierw.ok, Today, 04:12 PM
        0 responses
        15 views
        0 likes
        Last Post Javierw.ok  
        Working...
        X