Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Wait 30 minutes

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

    Wait 30 minutes

    Hi,

    I am running a straight forward Strategy that I created in the Wizard. Basically if one moving average crosses a pivot line then go either Long or Short depending upon the direction.

    Is there a way to add code to the Strategy that says once you receive a new Signal then ignore all other signals for xx minutes. For example if I am running a Strategy on a 5 minute chart I want to ignore all other signals for at least the next 30 minutes?

    Thank you,

    #2
    Hello Scarlett09,
    Thanks for your post.

    Unfortunately you cannot do it using the wizard. You can however further custom code this via the NinjaScript Editor.
    JoydeepNinjaTrader Customer Service

    Comment


      #3
      OK, that is great. Is there a standard line or two of code that can be added to the existing code or is this dependent on what the strategy entails? I would be happy to to move to the NinjaScript Editor.

      Comment


        #4
        Hello Scarlett09,
        Yes, you can simply use the BarsSinceEntry function to do it.

        If you are running the code on a 5 minute chart then you can use the following code:

        Code:
        if (this.BarsSinceEntry() > 6 || this.BarsSinceEntry() == -1)
        {
         //do something.
        }
        JoydeepNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        673 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        379 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        111 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        578 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        582 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X