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 geotrades1, Today, 10:02 AM
        1 response
        5 views
        0 likes
        Last Post NinjaTrader_BrandonH  
        Started by ender_wiggum, Today, 09:50 AM
        1 response
        5 views
        0 likes
        Last Post NinjaTrader_Gaby  
        Started by rajendrasubedi2023, Today, 09:50 AM
        1 response
        12 views
        0 likes
        Last Post NinjaTrader_BrandonH  
        Started by bmartz, Today, 09:30 AM
        1 response
        10 views
        0 likes
        Last Post NinjaTrader_Erick  
        Started by geddyisodin, Today, 05:20 AM
        3 responses
        27 views
        0 likes
        Last Post NinjaTrader_Gaby  
        Working...
        X