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 Mindset, 04-21-2026, 06:46 AM
        0 responses
        101 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by M4ndoo, 04-20-2026, 05:21 PM
        0 responses
        144 views
        0 likes
        Last Post M4ndoo
        by M4ndoo
         
        Started by M4ndoo, 04-19-2026, 05:54 PM
        0 responses
        71 views
        0 likes
        Last Post M4ndoo
        by M4ndoo
         
        Started by cmoran13, 04-16-2026, 01:02 PM
        0 responses
        125 views
        0 likes
        Last Post cmoran13  
        Started by PaulMohn, 04-10-2026, 11:11 AM
        0 responses
        79 views
        0 likes
        Last Post PaulMohn  
        Working...
        X