Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Exit after second day OnClose

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

    Exit after second day OnClose

    Hi all

    I would like to tell the StrategyBuilder, to Exit the Long position after the second day session OnClose.

    Is this possible in the StrategyBuilder?
    If not, how would the code look like?

    Thanks very much for any help!

    #2
    Hello esatino,

    Thank you for your post.

    To clarify, are you looking to exit on the close of the second daily bar after entry, or are you using a trading hours template with multiple daily sessions and want to exit on the end of the second session?

    What trading hours template are you using so that I may test any examples?

    Thanks in advance; I look forward to assisting you further.

    Comment


      #3
      Hi Kate,


      Yes, I'm looking to exit on the close of the second day.
      So, I enter on monday 12AM (or at any time), and I want to exit on the second day sessions end, for example in /ES.

      I use the 24/5 template.

      Thanks Kate

      Comment


        #4
        Hello esatino,

        Thank you for your patience.

        This would not be feasible in the strategy builder as you can't really do the math necessary with the times, and you can't set Exit on Session Close to only work every other day. You could achieve this by unlocking the script and coding custom logic in the strategy, however.

        You can also contact one of our professional NinjaScript Consultants or Educators who would be eager to create this script at your request or assist you with your script. Please let me know if you'd like me to have one of our Business Development team contact you with more information on this.

        If you decide to code this yourself, please let me know if we may offer any further information.

        Please let us know if we may be of further assistance to you.

        Comment


          #5
          Thanks for your feedback Kate.

          I'l try to code it myself and I would come back to you if I need more help,

          Thanks very much.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by NullPointStrategies, Today, 05:17 AM
          0 responses
          48 views
          0 likes
          Last Post NullPointStrategies  
          Started by argusthome, 03-08-2026, 10:06 AM
          0 responses
          126 views
          0 likes
          Last Post argusthome  
          Started by NabilKhattabi, 03-06-2026, 11:18 AM
          0 responses
          66 views
          0 likes
          Last Post NabilKhattabi  
          Started by Deep42, 03-06-2026, 12:28 AM
          0 responses
          42 views
          0 likes
          Last Post Deep42
          by Deep42
           
          Started by TheRealMorford, 03-05-2026, 06:15 PM
          0 responses
          46 views
          0 likes
          Last Post TheRealMorford  
          Working...
          X