Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Simple Strategy Order being ignored

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

    Simple Strategy Order being ignored

    I am having an issue with a very simple strategy where the order is not being executed.I keep on getting the error

    " An order placed at '5/15/2016 3:01:00 PM' has been ignored since the order was submitted before the strategy property BarsRequiredToTrade had been met."

    The strange thing is the date that it uses is '5/15/2016 3:01:00 PM' and not the current date 5/19/2016. Does anyone know why it uses '5/15/2016 3:01:00 PM'?

    I am using Ninja 8 beta 11 so it might be a bug.

    Please see video

    World's leading screen capture + recorder from Snagit + Screencast by Techsmith. Capture, edit and share professional-quality content seamlessly.

    #2
    Hello hotsalami, and thank you for your question.

    It is possible, if you are not excluding State == State.Historical, that the strategy is being run over historical as well as realtime data. I would recommend adding the following to the beginning of your OnBarUpdate method to see if it resolves your query.

    Code:
    [FONT=Courier New]if (CurrentBar < BarsRequiredToTrade)
    {
        return;
    }[/FONT]
    Please let us know if there are any other ways we can help.
    Jessica P.NinjaTrader Customer Service

    Comment


      #3
      Thanks NinjaTrader_JessicaP. I will use your code to check for this condition

      Comment


        #4
        Originally posted by hotsalami View Post
        I am having an issue with a very simple strategy where the order is not being executed.I keep on getting the error

        " An order placed at '5/15/2016 3:01:00 PM' has been ignored since the order was submitted before the strategy property BarsRequiredToTrade had been met."

        The strange thing is the date that it uses is '5/15/2016 3:01:00 PM' and not the current date 5/19/2016. Does anyone know why it uses '5/15/2016 3:01:00 PM'?

        I am using Ninja 8 beta 11 so it might be a bug.

        Please see video

        http://screencast.com/t/JKx6SgRx
        Specify a smaller number for BarsRequiredToTrade, or else check for validity of the condition and use it to gate your entry.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        633 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        364 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        105 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        567 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        568 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X