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

Enter Limit Orders at a given moving average

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

    Enter Limit Orders at a given moving average

    I've created a simple strategy using the strategy wizard. I'm trying to figure out how to enter a Long (or short) order at a given EMA once my condition is triggered.

    Is it not possible to use an indicator such as an EMA as the value where to place my limit order? Again, this is using the strategy wizard.

    Thanks for the help!

    #2
    pev11, whichb exact errors / issues are you getting? Do you see the condition hit but an order not filled then? For the limit orders generated via the wizard you would need to keep in mind that they would expire on the bar you've placed them on, meaning they would not persist to be filled a few bars later then if price would retrace for example. You can resubmit them every bar, or set the order to be liveUntilCancelled directly through coding -

    BertrandNinjaTrader Customer Service

    Comment


      #3
      Thanks for the response. It appears that is the primary problem (order cancelled after first bar).
      What I need is for the order to remain live until either:
      A. The order gets hit
      B. My condition triggers a reversal (order is cancelled and a new order is entered)
      C. Strategy ends at a specified time

      I guess I will have to edit the code manually to accomplish these parameters? Any tips?

      Thanks again!

      Comment


        #4
        Correct, to leave the order working you would want to use the more advanced overload to set it liveUntilCancelled.

        If you wish to reverse then CancelOrder() as needed and place the new needed order, this sample shows how to work with the custom cancelleation - http://www.ninjatrader.com/support/f...ad.php?t=18890

        For a time filter please check into - http://www.ninjatrader.com/support/f...ead.php?t=3226

        You can then simply CancelOrder at a specific time as well to ensure no later entry is taken.
        BertrandNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Jimmyk, 01-26-2018, 05:19 AM
        6 responses
        834 views
        0 likes
        Last Post emuns
        by emuns
         
        Started by jxs_xrj, 01-12-2020, 09:49 AM
        6 responses
        3,290 views
        1 like
        Last Post jgualdronc  
        Started by Touch-Ups, Today, 10:36 AM
        0 responses
        10 views
        0 likes
        Last Post Touch-Ups  
        Started by geddyisodin, 04-25-2024, 05:20 AM
        11 responses
        62 views
        0 likes
        Last Post halgo_boulder  
        Started by Option Whisperer, Today, 09:55 AM
        0 responses
        8 views
        0 likes
        Last Post Option Whisperer  
        Working...
        X