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 CarlTrading, 03-31-2026, 09:41 PM
        1 response
        80 views
        1 like
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 04-01-2026, 02:41 AM
        0 responses
        40 views
        0 likes
        Last Post CarlTrading  
        Started by CaptainJack, 03-31-2026, 11:44 PM
        0 responses
        63 views
        2 likes
        Last Post CaptainJack  
        Started by CarlTrading, 03-30-2026, 11:51 AM
        0 responses
        63 views
        0 likes
        Last Post CarlTrading  
        Started by CarlTrading, 03-30-2026, 11:48 AM
        0 responses
        54 views
        0 likes
        Last Post CarlTrading  
        Working...
        X