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

Placing additional Orders

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

    Placing additional Orders

    Experts

    I am trying to add an additional orders on top of an additonal order if conditions are met but no matter how I try , its not working for my back testing strategy. Can you help.

    if (Position.MarketPosition != MarketPosition.Long)
    {
    if (condition3)
    {
    EnterLong(1, "Long");
    }
    }
    else // If already in a long position
    {
    if (condition77) // Place additional order if condition met
    {
    EnterLong(1, "Long");
    }

    if (condition4) // Exit long position if condition met
    {
    ExitLong("Long", "Long");
    }​

    #2
    Hello NRITV,

    In State.Configure set EntriesPerDirection to 2 (or the number of entries you would like), and enable TraceOrders.

    Use different signal names for each entry, and use the fromEntrySignals for those entries in the exit orders.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Thank YOU. Much appreciated.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by AaronKoRn, Today, 09:49 PM
      0 responses
      1 view
      0 likes
      Last Post AaronKoRn  
      Started by carnitron, Today, 08:42 PM
      0 responses
      6 views
      0 likes
      Last Post carnitron  
      Started by strategist007, Today, 07:51 PM
      0 responses
      8 views
      0 likes
      Last Post strategist007  
      Started by StockTrader88, 03-06-2021, 08:58 AM
      44 responses
      3,975 views
      3 likes
      Last Post jhudas88  
      Started by rbeckmann05, Today, 06:48 PM
      0 responses
      9 views
      0 likes
      Last Post rbeckmann05  
      Working...
      X