Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

"Exit on Close" issue in Strategy

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

    "Exit on Close" issue in Strategy

    Hi,

    I am enabling a startegy in Ninjatrader. My issue is in the order handling section of the strategy. Currently in that section where it says "Exit on Close" the strategy is set to "True"

    The strategy works perfectly well as it should so that when 60 seconds prior to close approaches, the position gets automatically closed out. The issue I am having is that at the same time my Broker (AMP) is externally closing out that position too because the account is not funded adequately for ovenight margin. The problem this causes is that if I was long a position prior to the close then after these 2 actions I become net short and if I was short in a position prior to the close then after these 2 actions I become net long causing me to be in trade I may not want to be in.

    If I instead turn the "Exit on Close" feature to "False", my concern is what if for some reason my broker didn't automatically catch this under margin balance issue then here too I may be in a position I do not want to be in.

    Can you please offer any suggestions on how to resolve this matter? Thanks in advance for any help.

    Thanks,
    Jack

    #2
    Welcome to our forums here - I just replied to the inquiry you sent to support directly, please check your inbox.

    Thanks,

    Comment


      #3
      Bertrand,

      Thank you for your quick response. I can't seem to find it, which email address was it sent to?

      Thanks,
      Jack

      Comment


        #4
        Hi Jack, I emailed your @ toprockre dot com one. Have you checked the spam folders as well?

        Comment


          #5
          Hi Bertrand, its not there, can you please try resending it or maybe try this email instead, [email protected]

          Thanks
          Jack

          Comment


            #6
            Originally posted by joukie View Post
            Hi Bertrand, its not there, can you please try resending it or maybe try this email instead, [email protected]

            Thanks
            Jack
            Just resend and copied you on the alternate email as well.

            Comment


              #7
              Got it this time @ the joukie email,Thanks!

              How much time before the close do you think I should give before my Broker externally flattens out a position?

              Also if I may, I understand there is an option to receive an email notification when a trade has been taken
              In a strategy position. This feature doesn't seem to work for me? Have you an idea on how to correct?

              Thanks again!
              Jack

              Comment


                #8
                Hi Jack, great - best is checking first with your broker to understand when exactly he would apply the overnight margin and therefore would begin closing positions if needed - then you would know what time range is needed for the transition.

                There's no inbuilt notification feature for trades, you could use SendMail() in your code through for example to report a fill in OnExecution().

                Comment


                  #9
                  I guess what I'm referring to is in the Edit Strategy section there is an option in the Parameters section to enter an email address in the "Trade Alert" box. I put my email address and I never get the alert. Do I need to set something up in the Control center<tools<options<Misc section? Where it says mail set-up?

                  Comment


                    #10
                    Yes, that could be coded into the custom 3rd party strategy you use. To ensure this feature can work go to Tools > Options > Misc and test the default settings. If this would not work, please check for the log tab for any errors - you could also setup to use your ISP's / mail provider settings there, which would be a good alternative.

                    Comment


                      #11
                      Originally posted by NinjaTrader_Bertrand View Post
                      Yes, that could be coded into the custom 3rd party strategy you use. To ensure this feature can work go to Tools > Options > Misc and test the default settings. If this would not work, please check for the log tab for any errors - you could also setup to use your ISP's / mail provider settings there, which would be a good alternative.
                      Bertrand,

                      I tried both suggestions and it still did not work. Can you direct me somewhere I can learn more about how to set up the email settings?

                      Thanks for all your help!

                      Jack

                      Comment


                        #12
                        You're welcome - do you have also an email account at one of the listed providers in this post?

                        Below is a list of known e-mail settings and information demonstrating configuring e-mail alerts within NinjaTrader. Included are settings which have been tested with basic accounts. Please ensure that your settings are configured identically to those included, as some only use the beginning of the e-mail address and do not

                        Comment

                        Latest Posts

                        Collapse

                        Topics Statistics Last Post
                        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                        0 responses
                        657 views
                        0 likes
                        Last Post Geovanny Suaza  
                        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                        0 responses
                        373 views
                        1 like
                        Last Post Geovanny Suaza  
                        Started by Mindset, 02-09-2026, 11:44 AM
                        0 responses
                        109 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