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 run independent trades simultaneous in strategy

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

    How to run independent trades simultaneous in strategy

    Hi Ninja,

    I have been trying to create a strategy that can back test separate and simultaneous trades with their own individual set of bracket orders.

    I'm using EnterLongLimit orders for entry and not even a condition, f.i: EnterLongLimit(DefaultQuantity,10000,"");

    Ninja executes the trades beautifully when price has reached the limit price and executes the brackets in the backtest.
    It does so a number of times over the backtesting period for this limit price
    However, if I add a second ordermanagement command such as EnterLongLimit(DefaultQuantity,10100,""); (note the difference in price),
    then Ninja skips the first command and only executes the orders for the second price.
    Is there a way to have Ninja execute multiple trades like this simultaneously, and treat them separately with their own bracket orders and also not let the exit of one trade influence the exit of other running trades?
    I have tried several things already such as using separate condition sets/tabs in the wizard per orderentry command, changing "Entries per direction" to 10, changing "Entry Handling" to Unique Entries but nothing seems to work.
    Maybe it cannot be done with limit orders? Something else?
    I must be missing something.

    Can you help?

    Regards,
    Vladja

    #2
    Hello Vladja,

    Yes this is possible.

    You would want to uniquely name your entries in your enter methods, set entry entryHandling to Unique Entries, and pass the entry signal names to the from entry signal for your profit targets and stop losses.

    This will allow you to enter two different orders independent of each other, and have stops and targets assigned to the specific entries.

    I have attached a strategy demonstrating this.

    Please also see the following section of the helpguide,


    Please let us know if you need further assistance.
    Attached Files
    Alan P.NinjaTrader Customer Service

    Comment


      #3
      Hi Alan,

      Thanks, I think I've got it up and running ;-)

      Vladja

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by aa731, Today, 02:54 AM
      0 responses
      4 views
      0 likes
      Last Post aa731
      by aa731
       
      Started by thanajo, 05-04-2021, 02:11 AM
      3 responses
      470 views
      0 likes
      Last Post tradingnasdaqprueba  
      Started by Christopher_R, Today, 12:29 AM
      0 responses
      10 views
      0 likes
      Last Post Christopher_R  
      Started by sidlercom80, 10-28-2023, 08:49 AM
      166 responses
      2,237 views
      0 likes
      Last Post sidlercom80  
      Started by thread, Yesterday, 11:58 PM
      0 responses
      4 views
      0 likes
      Last Post thread
      by thread
       
      Working...
      X