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 cmoran13, 04-16-2026, 01:02 PM
          0 responses
          43 views
          0 likes
          Last Post cmoran13  
          Started by PaulMohn, 04-10-2026, 11:11 AM
          0 responses
          27 views
          0 likes
          Last Post PaulMohn  
          Started by CarlTrading, 03-31-2026, 09:41 PM
          1 response
          163 views
          1 like
          Last Post NinjaTrader_ChelseaB  
          Started by CarlTrading, 04-01-2026, 02:41 AM
          0 responses
          98 views
          1 like
          Last Post CarlTrading  
          Started by CaptainJack, 03-31-2026, 11:44 PM
          0 responses
          158 views
          2 likes
          Last Post CaptainJack  
          Working...
          X