Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

BarsSinceExitExecution() and ChangeOrder()

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

    BarsSinceExitExecution() and ChangeOrder()

    Hello

    In managed order approach, I use ChangeOrder() to modify stop two tick above long entry price with several conditions.

    How can I use BarsSinceExitExecution() n bars from initial stop but not in case BE+2. Is it possible change signal name? If not, how could be done?

    Thanks

    #2
    Hello Impeesa,

    Thanks for your post.

    If I understand correctly you have an entry with an initial stop. If this trade progresses and you have certain conditions met, you change the stop to BE+2. You are asking about how to create a next entry condition using BarsSinceExitExecution() but only if it hits your initial stop?

    If I have understood correctly, the answer here would be to create a bool variable that you set when you do the change order. You can use the state bool then to allow or prevent using BarsSinceEntryExecution(). A generic example:

    if (BarsSinceEntryExecution() >= 5 && myBool == true && your other entry conditions)
    {
    // do something
    myBool = false; // reset the bool
    }


    Comment


      #3
      Hello, Paul

      You are ok. I want to create a next entry condition using BarsSinceExitExecution() but only if it hits your initial stop.

      But in generic example provided, you use BarsSinceEntryExecution().

      I can not see how use a bool for my initial purpose...

      Comment


        #4
        Hello Impeesa,

        Thanks for your reply.

        Correct, I made a mistake using BarsSinceEntryExecution and meant to write that as BarsSinceExitExecution.

        When your code executes the change order, that is where you would set a bool variable that would be used to prevent the entry that uses BarsSinceExitExecution.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Mindset, 04-21-2026, 06:46 AM
        0 responses
        97 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by M4ndoo, 04-20-2026, 05:21 PM
        0 responses
        141 views
        0 likes
        Last Post M4ndoo
        by M4ndoo
         
        Started by M4ndoo, 04-19-2026, 05:54 PM
        0 responses
        68 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
        76 views
        0 likes
        Last Post PaulMohn  
        Working...
        X