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 CaptainJack, 05-29-2026, 05:09 AM
        0 responses
        388 views
        0 likes
        Last Post CaptainJack  
        Started by CaptainJack, 05-29-2026, 12:02 AM
        0 responses
        260 views
        0 likes
        Last Post CaptainJack  
        Started by charlesugo_1, 05-26-2026, 05:03 PM
        0 responses
        218 views
        1 like
        Last Post charlesugo_1  
        Started by DannyP96, 05-18-2026, 02:38 PM
        1 response
        302 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 05-11-2026, 05:56 AM
        0 responses
        268 views
        0 likes
        Last Post CarlTrading  
        Working...
        X