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

How to use pending orders in custom strategy

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

    How to use pending orders in custom strategy

    Hi Ninja,

    I'm trying to use pending orders in my custom strategy of the type stopLimit.
    I'm using the FDAX future, so this type of order should be possible.

    The strategy sofar is very simple and can be created using the wizard. Upon a certain condition (the close of a candle in a specified range) I do not want to enter the market immediately, but want to create PENDING orders. One LONG and one SHORT. Once the stop price for one of them has been reached, I want the strategy to enter limit at that same price. I therefore use EnterLongStop(Limit) & EnterShortStop(Limit) commands.

    The strategy compiles correctly, however the strategy history shows 0 trades, while the condition is true on many occasions, I also have plenty of history data loaded. Any ideas why the strategy does not execute any trade?

    On a side note: I have also tried this with just stop orders (no limit), but then only 1 trade is generated in the entire strategy history. Changing the setting from calculate on close to calculate on every tick also does not help.

    Hope you can help.

    Regards,
    Vladja

    #2
    Hello Vladja,

    Thanks for opening the thread.

    Stop and Limit entry methods will have to be submitted on each bar close in order for the order to stay active. This is documented in the Managed Approach section of the Help Guide which the Strategy Builder inherits for creating strategies.

    Managed Approach (Order submission) - https://ninjatrader.com/support/help...BasicOperation

    Within the Strategy Builder, you can program the strategy to set a bool to true once a condition is met and then place the order if that bool has become true. Otherwise, you can unlock the code and use the Advanced Order Handling Rules and Live Until Cancelled overloads for your entry methods.

    Advanced Order Handling (Live Until Cancelled) - https://ninjatrader.com/support/help...ancelledOrders

    Please let me know if I may be of further assistance.
    JimNinjaTrader Customer Service

    Comment


      #3
      Hi Jim,

      Thanks for your reply. It seems I have got to do some studying with regards to Ninja strategy concepts ;-)

      Regards,
      Vladja

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by DayTradingDEMON, Today, 09:28 AM
      4 responses
      21 views
      0 likes
      Last Post DayTradingDEMON  
      Started by geddyisodin, Yesterday, 05:20 AM
      9 responses
      50 views
      0 likes
      Last Post NinjaTrader_Gaby  
      Started by George21, Today, 10:07 AM
      1 response
      12 views
      0 likes
      Last Post NinjaTrader_ChristopherJ  
      Started by Stanfillirenfro, Today, 07:23 AM
      9 responses
      24 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by navyguy06, Today, 09:28 AM
      1 response
      9 views
      0 likes
      Last Post NinjaTrader_Gaby  
      Working...
      X