Multiple Orders With Different TP Values
Forums › ProRealTime English forum › ProOrder support › Multiple Orders With Different TP Values
- This topic has 10 replies, 4 voices, and was last updated 1 year ago by PeterSt.
-
-
11/14/2019 at 3:52 PM #112813
Hi all,
Was wondering if it is possible to have multiple orders enter the market at the same time and each of those orders has their own TP level that os pre-determined. This is for scalping purposes.
Here is an example:
- If the buy condition is true, enter the market with a position size of 3 (so three 1 lot orders)
- TP for order 1 is 1 point
- TP for order 2 is 2 points
- TP for order 3 is 3 points
Hope this makes sense.
Here is a piece of my code:
1234567if longpattern and tradecount < 2 thenbuy 1 contract at high + 0.25 stop //I want two more orders here to enter the market each with their own TP valueset target pprofit 1SLLong = abs((high + 0.25) - lowest[3](low)) + 0.25set stop ploss SLLongtradecount = tradecount + 1endif11/14/2019 at 4:07 PM #112815No, you can enter multiple times accumulating contracts/shares, but there will be only 1 SL and only 1 TP.
PRT does not allow to keep separate SL’s and TP’s for each trade entered.
11/14/2019 at 4:08 PM #112817In your example everytime line 5 is executed, the new SL will be set for ALL contracts/shares traded so far, no matter what time and price they were entered.
11/14/2019 at 4:09 PM #11281811/15/2019 at 8:50 AM #112861Another way to deal with multiple takeprofit is by using partial closure of the global position, example in this blog article: Partial closure of positions when price is retracing : A complete function
11/15/2019 at 8:55 AM #11286202/06/2022 at 10:29 AM #187653Hi everyone,
Has this feature evolved since ?
Also, in the current question, orders are opened at the same time, which then makes sense to think about partial closing.
But what if scaling in ? For instance, first order is opened now, and 30 minutes later; a second, new, order is placed at a different price.
If SL/TP are set at second order, specific to the second order, does it mean that the current position, from first order, gets the SL/TP to inherit from the second order and are then updated at time second order is placed ?
If this, then the only solution would be not to place any SL/TP for the second order, and to handle all of it in the code. But I am not sure IG will accept an order without a SL. Any thoughts ?
Thks,
gfx
02/10/2022 at 3:24 PM #188010Any set target or set stop will affect all open orders, it means all orders will have the same TP and SL (distance from opened price).
So in order to create exit of one of the order, the best way to deal is to place pending sell or exishort orders at calculated price from the POSITIONPRICE which is the mean open price of the orders basket.
07/02/2022 at 6:57 PM #196636Hi Nicholas,
Can I also ask if I can setup different TP for multiple strategies of the same instrument? I found from some old post that strategies should be independent of each other. So different TP would be allowed?
Thanks in advance.
07/05/2022 at 12:16 AM #196757Hi Nicholas,
Can I also ask if I can setup different TP for multiple strategies of the same instrument? I found from some old post that strategies should be independent of each other. So different TP would be allowed?
Thanks in advance.
Hi, anyone knows this?
07/05/2022 at 4:57 AM #196764 -
AuthorPosts
Find exclusive trading pro-tools on