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

Split Order: Scalp and Runner

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

    Split Order: Scalp and Runner

    Hey!

    I'm trying to emulate a split order as I can set up an an ATM strategy. Can you let me know what's wrong with this code? It seems to only place one order when triggered.

    Thanks



    Code:
    if ((Position.MarketPosition == MarketPosition.Flat)
    && (Conditions == true))
    
    {
    
    SetProfitTarget(@"scalp", CalculationMode.Ticks, 7);
    SetStopLoss(@"scalp", CalculationMode.Ticks, 18, false);
    EnterShortStopMarket(currentStopLong - (TickSize * 7), @"scalp");
    
    SetProfitTarget(@"runner", CalculationMode.Ticks, 28);
    SetStopLoss(@"runner", CalculationMode.Ticks, 24, false);
    EnterShortStopMarket(currentStopLong - (TickSize * 8), @"runner");
    
    }
    Last edited by coopgrafik; 07-07-2021, 06:02 PM.

    #2
    Hello coopgrafik,

    Thanks for your post.

    I suspect that your entries per direction are set to a value of 1 with your entry handling set to "AllEntries", these are the strategy default settings and would allow for 1 entry only, per direction.

    As you are using signal names, all you need to do is set the "Entry Handling to "UniquesEntries". (The signal names differentiate the entries making them unique so both entries would be made).

    You can set this in the strategy itself or you can set this when you apply the strategy in the strategy parameters.

    Reference: https://ninjatrader.com/support/help...ryhandling.htm
    Paul H.NinjaTrader Customer Service

    Comment


      #3
      Thanks Paul. That worked like a charm!

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Jimmyk, 01-26-2018, 05:19 AM
      6 responses
      834 views
      0 likes
      Last Post emuns
      by emuns
       
      Started by jxs_xrj, 01-12-2020, 09:49 AM
      6 responses
      3,290 views
      1 like
      Last Post jgualdronc  
      Started by Touch-Ups, Today, 10:36 AM
      0 responses
      10 views
      0 likes
      Last Post Touch-Ups  
      Started by geddyisodin, 04-25-2024, 05:20 AM
      11 responses
      62 views
      0 likes
      Last Post halgo_boulder  
      Started by Option Whisperer, Today, 09:55 AM
      0 responses
      8 views
      0 likes
      Last Post Option Whisperer  
      Working...
      X