Announcement

Collapse
No announcement yet.

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 ybhx0315, Yesterday, 09:06 PM
      0 responses
      15 views
      0 likes
      Last Post ybhx0315  
      Started by parkinsonbr, Yesterday, 08:23 PM
      1 response
      9 views
      0 likes
      Last Post NinjaTrader_Jesse  
      Started by fxRichard, Today, 04:35 AM
      2 responses
      14 views
      0 likes
      Last Post fxRichard  
      Started by fernlicht, Today, 01:59 AM
      12 responses
      60 views
      0 likes
      Last Post NinjaTrader_Jason  
      Started by space_trader, Today, 12:52 AM
      0 responses
      16 views
      0 likes
      Last Post space_trader  
      Working...
      X