Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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

    Free online storage and sharing with Screencast.com. 2 GB of storage and 2 GB of bandwidth per month for free. We won't compress, alter or take ownership of your content.

    #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 Tim-c, Today, 02:10 PM
        1 response
        7 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by Taddypole, Today, 02:47 PM
        0 responses
        2 views
        0 likes
        Last Post Taddypole  
        Started by chbruno, 04-24-2024, 04:10 PM
        4 responses
        50 views
        0 likes
        Last Post chbruno
        by chbruno
         
        Started by TraderG23, 12-08-2023, 07:56 AM
        10 responses
        399 views
        1 like
        Last Post beobast
        by beobast
         
        Started by lorem, Yesterday, 09:18 AM
        5 responses
        25 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Working...
        X