Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Order quantity divided by two after X points of profit

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

    Order quantity divided by two after X points of profit

    Hi everybody,

    I just would like to have an example of an order (let's say a buying order) of 12 contracts, which 'losses' 6 contract when we reach +5 points and close the rest of the position (6 others contracts) when we reach +10 points.
    Currently I use two leg to do this but I would like to do everything in one leg

    Thanks a lot

    After

    #2
    Hello After,

    Thank you for your post.

    Unfortunately, this would have to be done with two entries when using the Managed Order Approach.

    Comment


      #3
      Oh, of course I meant using the unmanaged approach order, could give me a simple exaple please ?

      Comment


        #4
        Hello After,

        Thank you for your response.

        I do not have any examples of this. What are you having trouble setting up with the Unmanaged Approach?

        Comment


          #5
          Yeah the stop loss of my second leg (the one wich moves to breakeven once the first leg is closed) has an issue : the quantity is multiplicated by two, I absolutely don't know why

          Comment


            #6
            Hello After,

            Thank you for your response.

            Below you will find an example of entering for 12 on one order and exiting for 6 on two orders.
            Code:
            			if(Close[0] > Open[0]
            				&& Position.MarketPosition == MarketPosition.Flat
            				&& entry == null)
            			{
            				entry = SubmitOrder(0, OrderAction.Buy, OrderType.Market, 12, 0, 0, "", "entry");
            			}
            			
            			if(Position.MarketPosition == MarketPosition.Long
            				&& Position.Quantity == 12
            				&& exit1 == null
            				&& exit2 == null)
            			{
            				exit1 = SubmitOrder(0, OrderAction.Sell, OrderType.Limit, 6, entry.AvgFillPrice + 5, 0, "", "exit1");
            				exit2 = SubmitOrder(0, OrderAction.Sell, OrderType.Limit, 6, entry.AvgFillPrice + 10, 0, "", "exit1");
            			}

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Geovanny Suaza, 02-11-2026, 06:32 PM
            0 responses
            670 views
            0 likes
            Last Post Geovanny Suaza  
            Started by Geovanny Suaza, 02-11-2026, 05:51 PM
            0 responses
            379 views
            1 like
            Last Post Geovanny Suaza  
            Started by Mindset, 02-09-2026, 11:44 AM
            0 responses
            111 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
            582 views
            1 like
            Last Post RFrosty
            by RFrosty
             
            Working...
            X