Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Exit on Close w/ Multiple Conditions

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

    Exit on Close w/ Multiple Conditions

    Hi,

    I have a trading Strategy with 4 set Conditions. I only want to utilize the following script ExitOnClose = true for 2 of those conditions, which is Condition 3 and 4 below. Is this possible?


    // Condition set 1
    if (CrossAbove(...))
    {
    EnterLong(DefaultQuantity,"EnterLong");
    }
    // Condition set 2
    if (CrossBelow(...))
    {
    EnterShort(DefaultQuantity,"");
    }
    // Condition set 3
    if (CrossBelow(...))
    {
    EnterShort(DefaultQuantity,"");
    }
    // Condition set 4
    if (CrossAbove(...))
    {
    EnterLong(DefaultQuantity,"");

    }




    Thank you,


    #2
    Scarlett09, ExitOnClose would work on a per script basis and include all conditions. You could though disable it and custom handle the exits via checking against Time[0] (the bar timestamp). If you keep track which entry lead to the current trade, then you would know when to raise your custom exit on close and when to hold as you desired.

    Comment


      #3
      Thanks, now is there a way to add scipt which will Sync my account position when the new trading session starts. In particular I am looking to Sync my position to Condition 1 (meaning enter a Long position) if Condition 3 or Condition 4 were closed using the ExitonClose script from the prior session?

      Comment


        #4
        Scarlett09, the strategy scripts would not cross communicate but there's a sync function for every script inbuild in NT -



        When you enable your script, it would go through the historical calculation part and come up with a strategy position it would hold and then offer (if needed) to send a market order to your account to establish sync.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        661 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        375 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        110 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        574 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        579 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X