Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Setting Indicator to Reset on RTH Open

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

    Setting Indicator to Reset on RTH Open

    Hello,
    I am running the RTH session only and want to have the indicator to reset on the Open. I was hoping for any direction and examples if possible. I'm a total novice to coding but trying hard to learn. I'm looking to reset the RMI indicator that I attached here.
    Thank you for any help with this and I appreciate all those helping here in these forums.
    Thanks again.
    James
    Attached Files

    #2
    Hello James,

    Thanks for your post.

    You could consider using Bars.IsFirstBarOfSession in a condition to detect if the current bar processing is the first bar updated in a trading session and reset the values you want within that condition.

    See this help guide for more information about Bars.IsFirstBarOfSession and sample code: https://ninjatrader.com/support/help...rofsession.htm

    Let us know if we may assist further.

    <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

    Comment


      #3
      Hello Brandon,
      Thank you for your response. I'm really new to coding and looked through the information and tried out a few options but wasn't able to get anything to work. Is it possible to see an example?
      Thanks again for any help.
      Regards,
      James

      Comment


        #4
        Hello James,

        Thanks for your note.

        I understand that you want to reset values in your script to begin a trading session fresh.

        See the reference sample, SampleTradeLimiter, linked below that demonstrates resetting a variable at the beginning of a new trading session by using Bars.IsFirstBarOfSession.



        Let us know if we may assist further.
        <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

        Comment


          #5
          Thanks Brandon.
          I will take a look at the example script and see what I can come up with.
          Thanks again for your time.
          Regards,
          James

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Geovanny Suaza, 02-11-2026, 06:32 PM
          0 responses
          579 views
          0 likes
          Last Post Geovanny Suaza  
          Started by Geovanny Suaza, 02-11-2026, 05:51 PM
          0 responses
          334 views
          1 like
          Last Post Geovanny Suaza  
          Started by Mindset, 02-09-2026, 11:44 AM
          0 responses
          101 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Started by Geovanny Suaza, 02-02-2026, 12:30 PM
          0 responses
          554 views
          1 like
          Last Post Geovanny Suaza  
          Started by RFrosty, 01-28-2026, 06:49 PM
          0 responses
          551 views
          1 like
          Last Post RFrosty
          by RFrosty
           
          Working...
          X