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 NullPointStrategies, Yesterday, 05:17 AM
        0 responses
        64 views
        0 likes
        Last Post NullPointStrategies  
        Started by argusthome, 03-08-2026, 10:06 AM
        0 responses
        139 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
        45 views
        0 likes
        Last Post Deep42
        by Deep42
         
        Started by TheRealMorford, 03-05-2026, 06:15 PM
        0 responses
        50 views
        0 likes
        Last Post TheRealMorford  
        Working...
        X