Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Tick LineBreak position exit not working consistently

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

    Tick LineBreak position exit not working consistently

    I have a strategy using the Strategy Builder that only enters or exits trades on bar close. I'm using this on a 3 Line Break chart. Most of the entries seem correct but a significant portion of the exits are exiting in the same bar as the entry even though the entry requires an up close and the exit requires a down close. I added a "bars since entry !=0" to the exit conditions but it had no effect. I've attached an example of it working correctly and then a short time later exiting incorrectly. The only conditions for an exit are a down close and bars since entry not equal to 0.

    Any ideas on what my issue is?
    Attached Files

    #2
    Hello dpvrkb,

    Thank you for your note.

    I'd like to test the strategy on my end to see what may be occurring. You can export the strategy from Tools > Export > NinjaScript Addon. Do not check the box to export as a compiled assembly or I will not be able to review your logic. Please attach the resulting .Zip file to your reply.

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

    Comment


      #3
      Thanks Kate, I've attached the strategy.
      Attached Files

      Comment


        #4
        Hello dpvrkb,

        Thank you for your reply.

        I'm not seeing you've actually applied the Bars Since Entry != 0 to the actual condition sets with the exits. All that happens in those sets is that you set a bool that you never actually seem to use or set back to false.

        You'd want to place that logic in sets where an exit would actually be triggered - so Sets 9 and 18 are the ones that actually trigger exits, so you'd want to put that BarsSinceEntry logic in there to keep that from occurring. I also note you set MOMOLong and MOMOShort to true and never set those back to false - I'm not sure if that's intentional or not.

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

        Comment


          #5
          Thank you, sorry about that, I forgot all about needing to set the bools back to false. I've fixed it and it looks like it is working properly now.

          Comment

          Latest Posts

          Collapse

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