• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Daily Loss Limit for Multiple Orders

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

    Daily Loss Limit for Multiple Orders

    Hi there!
    I have a issue with a daily loss limit for MULTIPLE ORDERS
    Lets say by default it is $275.

    private int lossLimit = 275;

    I use IOrder Array for multiple orders.

    private IOrder[] entryOrders = new IOrder[4];

    I have this example from Ninja Trader Support. The program works very well. It stops whenever I have my daily loss of 275.

    However, if I add a CANCEL ORDER method to the program then IT DOESN’T WORK AT ALL. It continues to run the strategy when my daily stop loss hit. Simply saying it doesn't stop.

    if (entryOrders[1] != null && CurrentBar >= barNumbOfShorOrder1 + 1)
    { CancelOrder(entryOrders[1]);
    entryOrders[1] = null;}

    I back tested on 11/02/2015 it supposed to stop at 4:30 am because of my daily loss hit and no more trading till the end of the session. However it continues to run.

    Daily Loss Limit for Multiple orders are very important to me because this is a RISK MANAGEMENT of my strategy

    Do you how to fix this strategy?


    STRATEGY FILE INCLUDED

    Thanks,
    Serge
    Attached Files
    Last edited by olres7; 11-16-2015, 09:50 AM.

    #2
    Hello Serge,

    Thank you for your inquiry.

    Can you please provide an instance when your profit loss is less than or equal to -LossLimit and your exit short order is ignored?

    What exact parameters are you using in your backtest that produces this behavior so I can replicate on my end? What instrument is this on?
    Zachary G.NinjaTrader Customer Service

    Comment


      #3
      I already fixed it

      Thanks

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Jschmelz, Yesterday, 04:45 PM
      1 response
      17 views
      0 likes
      Last Post NinjaTrader_Marco  
      Started by sisenberg, Today, 07:29 AM
      1 response
      8 views
      0 likes
      Last Post sisenberg  
      Started by Oceans, Today, 02:22 AM
      2 responses
      25 views
      0 likes
      Last Post Oceans
      by Oceans
       
      Started by sisenberg, Yesterday, 08:06 PM
      1 response
      24 views
      0 likes
      Last Post sisenberg  
      Started by PLeary, Today, 06:25 AM
      1 response
      18 views
      0 likes
      Last Post NinjaTrader_SergeyS  
      Working...
      X