Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Help with iorder

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

    Help with iorder

    Hi I wrote a strategy that uses EnterLongStop and ExitLongStop for opening and closing positions. In backtests everything works fine but I don't have enough market replay data to verify in live conditions.

    Could someone please have a look and tell me if my script will do the following: if in the primary bars the open > close two orders are sent to my broker (IB). An enterlongstop at the MAX high of the last 2 candles and an exitlongstop at the low of the candle before. Then on every update of the primary bar the exitlongstop is updated to the most recent low.

    Ist the ExitLongStop active even if the EnterLongStop has not been triggered?
    Code:
    			if (BarsInProgress == 0)
    			{
    				
    			stopOrderL = ExitLongStop(1, true, DefaultQuantity, Low[1], "ExitLong 1min", "LongStop 1min");
    
    
    			if (Open[0] > Close[0])
    				{
    					entryOrderL = EnterLongStop(1, true, DefaultQuantity, MAX(High, 2)[1], "LongStop 1min");
    					stopOrderL = ExitLongStop(1, true, DefaultQuantity, Low[1], "ExitLong 1min", "LongStop 1min");				
    
    
    				}
    	
    			}

    #2
    Maro, which market are you working / testing on? Market Replay data could be downloaded from our servers as well via File > Utilities > Download Replay Data.

    Since you're working in managed mode the ExitLongStop would not be active unless the entry triggered.

    Comment


      #3
      Hi Bertrand,

      I'm working with commodities futures. I only have a few trades a year and I would need loads of market replay data to find trades. My basic issue is that in my backtests everything works well, but I'm a little anxious about executing the strategy live. Could you please tell me if the following is right:

      The EnterLongStop is sent to the secondary timeframe and will stay active untill it is cancelled?

      All orders are sent to my broker only if the stop price is hit.

      ExitStopLong orders do not exist without an open position in the managed approach.

      Thanks

      Marco

      Comment


        #4
        Hi Marco,

        1. Correct, with LiveUntilCancelled those do not expire, either you cancel order or the end of session handling takes over.

        2. The order will be sent to your broker when the condition triggers, it would only execute though if the price is hit.

        3. ExitLongStop orders would be ignored in the managed approach unless the entry signal name they are tied to has a position open.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        668 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        377 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        110 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        575 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        580 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X