Two trades from the same bot
Forums › ProRealTime English forum › ProRealTime platform support › Two trades from the same bot
- This topic has 7 replies, 3 voices, and was last updated 1 year ago by PabloRod.
-
-
03/28/2023 at 12:30 AM #212263
Hello,
Is it possible that a bot opens two opposite trades? Long & Short.
Example. Sometimes my bot open a long position that stays for a long time, I would like to keep this position, but if there is another opposite signal (that will be for short time), to open a short position, that will later be removed. I dont want to close the original trade.
Thanks
03/28/2023 at 6:57 AM #212265bot opens two opposite trades? Long & Short.
No this is not possible (an IG / broker restriction).
03/28/2023 at 8:39 AM #21227303/28/2023 at 8:58 AM #212276Maybe IG have to allow it in manual trading else they be at a disadvantage compared to competitors (manual traders would not bother with IG etc).
IG have enjoyed a monopoly (up to very recently) on AutoTrading with PRT and so IG have been able to dictate the rules etc?
Do Interactive Brokers allow Long and Short trades using ProOrder / AutoTrading?
03/28/2023 at 9:08 AM #212278Well, to do simultaneous trades with opposite sign (or same sign) requires more things in PRT code.
For example my idea was to do a kind of hedge trade inside a longer trade. But this requires to identify and separate each trade, each one must have its own SL and TS, while right now PRT applies the TS to the existing open trade. Conclusion: this requires more logic in the code, not only to open different trades.
To do a separate robot was my first approach, but it is very hard to replicate all the events when it has a complex logic (specially in the TS). I think it is a good idea for a future development.
03/28/2023 at 9:24 AM #212283Do Interactive Brokers allow Long and Short trades using ProOrder / AutoTrading?
No and (possibly) Worse;
With IB it’s most probably not possible to have more than one system running on the same instrument. Stupid thing : this would have worked under very restrictive prerequisites (like you/me/users must very well know what they are doing) which includes it not being allowed to have the one System being Long and the other being Short. It is PRT which can not cope with that because IB does not allow it. But now the stupid thing :
- Because PRT thinks this will fail at the users (which assumption would be quite correct) it is also not allowed to have two Long (or two Short) systems; two systems would just not be allowed. And :
- Because PRT managed to build in restrictive entries (starting of systems) which was deemed necessary during the beta testing (again justified) they now have the means to control this from all angles. One example below which tells “In order to start this System, take care first that you don’t have an open position on this instrument” (I have an open position indeed).
This is one of the easily counted dozen of restrictive messages, but which tells all : once I have a position it could be Long vs my intended Short System. And IB can’t deal with that.
In PRT-IB Papertrading (which is the Demo for PRT-IB) you can see that all would work with two different Systems on the same instrument, if they are only in the same direction. This would work in Live too (I know that from direct trading under IB by means of Trader Workstation (TWS)). But we can bet that the restrictive Starts of Systems will prevent this.
I am sure you want to hear PRT’s response on this small issue (ahem) :
“This can be solved by having several accounts”.
Yeah, sure.1 user thanked author for this post.
03/28/2023 at 9:31 AM #212285To do a separate robot was my first approach, but it is very hard to replicate all the events when it has a complex logic (specially in the TS). I think it is a good idea for a future development.
I have considered several times to set up a mechanism where the code itself virtually separates trades. But it seems such a huge task that I stayed away from that.
And so indeed I use separate Systems. You only need to be creative on how to make these systems “co-operate” while they don’t know about each other. I let this creativity be yours. 🙂03/28/2023 at 9:43 AM #212293Thanks for your clue, but I am more trader than developer. As far as I know the robots don’t see each other. The only way is to replicate in the ‘hedge bot’ the signals to enter/exit from the main robot. But this is not accurate at all when you have complex strategies.
Thanks again,
-
AuthorPosts
Find exclusive trading pro-tools on