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 burtoninlondon, Today, 12:38 AM
        0 responses
        5 views
        0 likes
        Last Post burtoninlondon  
        Started by AaronKoRn, Yesterday, 09:49 PM
        0 responses
        14 views
        0 likes
        Last Post AaronKoRn  
        Started by carnitron, Yesterday, 08:42 PM
        0 responses
        11 views
        0 likes
        Last Post carnitron  
        Started by strategist007, Yesterday, 07:51 PM
        0 responses
        13 views
        0 likes
        Last Post strategist007  
        Started by StockTrader88, 03-06-2021, 08:58 AM
        44 responses
        3,983 views
        3 likes
        Last Post jhudas88  
        Working...
        X