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 knighty6508, 05-10-2024, 01:20 AM
      4 responses
      24 views
      0 likes
      Last Post knighty6508  
      Started by OllieFeraher, 05-09-2024, 11:14 AM
      6 responses
      19 views
      0 likes
      Last Post OllieFeraher  
      Started by PaulMohn, 05-02-2024, 06:59 PM
      2 responses
      43 views
      0 likes
      Last Post PaulMohn  
      Started by ETFVoyageur, Today, 02:10 AM
      0 responses
      11 views
      0 likes
      Last Post ETFVoyageur  
      Started by rayyyu12, Today, 12:47 AM
      0 responses
      8 views
      0 likes
      Last Post rayyyu12  
      Working...
      X