Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How can I stop entering a trading after taking profit?

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

    How can I stop entering a trading after taking profit?

    Hello,

    After taking profit sometimes the chart still meets the entry conditions, and my strategy would enter the trade again and exit immediately because it also hits the profit target and repeat this process.

    For example if my condition was to go long if current bar close is above previous bar high and profit target 5 ticks above previous high, after hitting the profit target the entry condition is still met and the trade would be entered again and closed immediately.

    I do not want to use BarsSinceExit() > 1 because if stopped out on entry bar I want to be able to re-enter the trade on the same bar if price moves back. How can I solve this problem? Thanks in advance!

    #2
    beierde888, sometimes depending on your actual entry conditions reformulating them can help to ensure the logic does not evaluate continuously, for example through checking for a CrossAbove a certain value and just doing a >= comparison.

    Another option is using a bool flag / user variable as part of your entry condition which you set to avoid another entry if the target was hit, question would the be what condition do you use to 'rearm' - a certain # of bars after the signal / the session break?

    Comment


      #3
      Thanks Bertrand, that helped a lot.
      I modified the entry conditions and problem solved!

      Comment


        #4
        Ok, great glad to hear that - have a good day.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by argusthome, 03-08-2026, 10:06 AM
        0 responses
        86 views
        0 likes
        Last Post argusthome  
        Started by NabilKhattabi, 03-06-2026, 11:18 AM
        0 responses
        48 views
        0 likes
        Last Post NabilKhattabi  
        Started by Deep42, 03-06-2026, 12:28 AM
        0 responses
        30 views
        0 likes
        Last Post Deep42
        by Deep42
         
        Started by TheRealMorford, 03-05-2026, 06:15 PM
        0 responses
        33 views
        0 likes
        Last Post TheRealMorford  
        Started by Mindset, 02-28-2026, 06:16 AM
        0 responses
        67 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Working...
        X