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

Unmanaged Orders on Strategy Restart

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

    Unmanaged Orders on Strategy Restart

    Hi,

    I've writing an unmanaged order breakout strategy that puts the orders in once the breakout range has been determined.

    It works fine in backtesting, but when I try to start the order up late (after the stop orders would have been placed), the orders are not shown/placed.

    How do I force an order placement?

    I'm using:
    entryOrderL = SubmitOrder(0,OrderAction.Buy, OrderType.Stop, longShares,0,longEntryPrice,"","Enter Long");

    Thanks,

    John

    #2
    What color is the state of the strategy after you start up? Is it yellow or green?

    What are you starting options under Tools--> Options--> Strategy tab--> NinjaScript tab? Is it immediately submit, or wait until flat?
    MatthewNinjaTrader Product Management

    Comment


      #3
      More info...

      Matthew,

      The strategy is green.

      I am trying to run this in simulation mode on my Sim101 account.

      This morning I started the strategy before the open - and no orders have been placed.

      BUT: If I run the strategy analyzer, I get the proper entry for today's price action.

      So, can you help me understand why am I getting good entries on back testing, but no entries when live?

      John

      Comment


        #4
        Hi,

        I would need context of your strategy to understand why it was not submitting live. There is nothing from the entry line you submitted that would not work.

        If you add a Print() statement under the same condition in which submit order is being used, do you get a print to the output window? (http://www.ninjatrader.com/support/f...ad.php?t=48541)

        You can also add the TraceOrders property to your Initialize method which may give insight as to why the order is not being submitted:

        MatthewNinjaTrader Product Management

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by royhagerman, Today, 04:30 AM
        0 responses
        1 view
        0 likes
        Last Post royhagerman  
        Started by haas88, 03-21-2024, 02:22 AM
        18 responses
        208 views
        0 likes
        Last Post haas88
        by haas88
         
        Started by Board game geek, Today, 02:20 AM
        0 responses
        6 views
        0 likes
        Last Post Board game geek  
        Started by knighty6508, Today, 01:20 AM
        2 responses
        15 views
        0 likes
        Last Post knighty6508  
        Started by franatas, Today, 01:53 AM
        0 responses
        5 views
        0 likes
        Last Post franatas  
        Working...
        X