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?
    BertrandNinjaTrader Customer Service

    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.
        BertrandNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by cre8able, Today, 03:20 PM
        0 responses
        2 views
        0 likes
        Last Post cre8able  
        Started by Fran888, 02-16-2024, 10:48 AM
        3 responses
        45 views
        0 likes
        Last Post Sam2515
        by Sam2515
         
        Started by martin70, 03-24-2023, 04:58 AM
        15 responses
        114 views
        0 likes
        Last Post NinjaTrader_Jesse  
        Started by The_Sec, Today, 02:29 PM
        1 response
        7 views
        0 likes
        Last Post NinjaTrader_Jesse  
        Started by jeronymite, 04-12-2024, 04:26 PM
        2 responses
        31 views
        0 likes
        Last Post NinjaTrader_BrandonH  
        Working...
        X