Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Keep limit order

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

    Keep limit order

    Hi, I learned that the limit order placed by strategy will be cancelled if it is not fill. I would like to know how to keep the order going until filled or cancelled. I read from another post that the logic is similar to the BreakEvenStrategy but after multiple try, still can't get it going. Could anyone kindly post a template for Strategy Builder? Thank you.
    Last edited by Invest78; 06-15-2023, 05:27 PM.

    #2
    Hello, thanks for writing in. We have an existing example that keeps the resting orders alive by re-submitting the order on every bar it should be active:



    In an unlocked script, you can use the order overload that allows you to keep the order alive without needing to re-submit:

    Comment


      #3
      Thanks Chris, I did read thru most post in that link even before I posted my request but I did not see an example on resubmitting the order based on limit order. I have seen a number of examples on Breakeven and trailing stop. Perhaps I have missed it. I tried to create one based on those logic but wasn't successful. Do you might attached the example? Thank you.

      Comment


        #4
        Hi, thanks for the follow up. There could be many ways to ensure the order gets re-submitted on every bar it should be alive. The most common way in the strategy builder is to use the "TriggerState" system that the break even example I posted uses. I would recommend studying and fully understanding this example.

        Comment


          #5
          Hi Chris, based on the break even example and the trigger state system, I got stuck how to do the order re-submission.
          Set 1: When market position is flat, I set it as TriggerState=0
          Set 2: When the entry conditions are met, I set it as TriggerState=1 and define the EntryPrice (which is the close of the signal bar plus offset). I use Renko type bar.
          Set 3: When TriggerState=1 and market position is flat, I set it to TriggerState=2 and do LongLimit entry with the EntryPrice.

          Then I am stuck for Set 4. Do I put the condition for TriggerState=2 and do the LongLimit Entry again? I have try different combination but did not seems to work.
          Thank you for your help.

          Comment


            #6
            Hi, I apologize but I will not be able to help with any custom developments. The examples that we provide come "As is" and if any modifications would need to be made another member of the forum would need to assist with customizations.

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by NullPointStrategies, Yesterday, 05:17 AM
            0 responses
            62 views
            0 likes
            Last Post NullPointStrategies  
            Started by argusthome, 03-08-2026, 10:06 AM
            0 responses
            134 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