Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

order oco

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

    order oco

    OrdenStop = ExitLongStopMarket(0, true, execution.Order.Filled, StopLoss, "STOP", "LARGOS");
    OrdenProfit = ExitLongLimit(0, true, execution.Order.Filled, Target, "TARGET", "LARGOS");

    Currently this is the sl and tp mode that I use, I would like to convert this into oco commands, how would I do this or where can I get documentation?​​

    #2
    Hello franatas

    When using the managed approach you would use signal names to control OCO. In this case if the position which the entry LARGOS made is closed the order which did not fill will cancel.




    If you want to manually manage OCO you need to use the unmanaged approach. There is a sample of using OCO in unmanaged here:

    Comment


      #3
      following the steps that you indicated to me when making an unmanaged entry, it just doesn't execute the input and doesn't give any error
      IsUnmanaged = true;

      substituted​ : EnterLongStopLimit(0, true, ContratosBuy, PrecioEntrada + 2 * TickSize, PrecioEntrada, Buy);
      for: SubmitOrderUnmanaged(0, OrderAction.Buy, OrderType.StopLimit, ContratosBuy, PrecioEntrada + 2 * TickSize, PrecioEntrada, "", Buy);

      Comment


        #4
        Hello franatas,

        Is your condition becoming true? I wouldn't be able to tell from the given information why it was not submitted.

        Comment


          #5
          Yes of course, the code is simply for you to enter if it is a bullish candle in short and if not in long

          Comment


            #6
            captura de inicio
            Attached Files

            Comment


              #7
              I found the problem but now it gives me this
              Attached Files

              Comment


                #8
                Hello franatas,

                You need to remove and re apply scripts if you make changes to their OnStateChange section.

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                0 responses
                597 views
                0 likes
                Last Post Geovanny Suaza  
                Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                0 responses
                343 views
                1 like
                Last Post Geovanny Suaza  
                Started by Mindset, 02-09-2026, 11:44 AM
                0 responses
                103 views
                0 likes
                Last Post Mindset
                by Mindset
                 
                Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                0 responses
                556 views
                1 like
                Last Post Geovanny Suaza  
                Started by RFrosty, 01-28-2026, 06:49 PM
                0 responses
                555 views
                1 like
                Last Post RFrosty
                by RFrosty
                 
                Working...
                X