Exits on Limit orders don’t work today
Forums › ProRealTime English forum › ProRealTime platform support › Exits on Limit orders don’t work today
- This topic has 9 replies, 3 voices, and was last updated 2 years ago by PeterSt.
-
-
07/29/2022 at 4:43 PM #198083
This is just in case others face similar issues :
Systems started today (I didn’t try the past week) refuse to exit on commands like these :
123Sell LotSize contracts at TrailUnderValue Stop // 15-05-2022,PS, Like this.ExitShort LotSize contracts at TrailUnderValue Stop // 15-05-2022,PS, Like this.This is in real Live.
Systems with ltterally the same commands – but started a month ago – still run fine.
The very same code copied from the Live system handed to ProOrder (via a link like you see below) runs fine and as expected in Backtest.
If I am the only one then …
(then it could be me but I checked and double checked)07/30/2022 at 4:06 AM #198101With pending orders you cannot partially close positions, you have to use AT MARKET orders instead.
It works in backtests because PRT allows that, but when it comes to autotrading with IG it doesn’t, as IG has no support for this.
Try removing LotSize contracts.
07/30/2022 at 8:46 AM #198108LotSize contains the full amount hence this is not about partial closing.
What I do there works for ages already. But newly offered systems yesterday, don’t dig it (no errors, it just does not work).Systems with ltterally the same commands – but started a month ago – still run fine.
What I meant that they still run and perform the commands as expected. Two systems in parallel, the one works, the other does not (never exits).
07/30/2022 at 9:28 AM #198109LotSize contains the full amount
Try with a number (full qty of Long or Short) instead of Lotsize … you have to try else you will never know.
Maybe PRT made changes and there is an active from date in the ProOrder engine so already running TS can continue, but new TS cannot start > active from date??
Process of elimination to pin down the cause of your Issue?
07/30/2022 at 10:12 AM #198110If it’s not partial closing, then Sell at TrailUnderValue Stop is perfect, why using any number at all?
You don’t have to remove LotSize from your code, just from those two lines.
07/30/2022 at 10:25 AM #198113Process of elimination to pin down the cause of your Issue?
And lose money over that ?
The cause is clear. PRT changed something and now it does not work any more.
I could try Demo on Monday.This is just ridiculous.
Also, this is not IG at all or else the existing (month ago started) systems would not work any more as well.
And remember, the Limit and Stop orders are “soft orders” which need to be repeated each (bar-) call. So this is just PRT.07/30/2022 at 10:30 AM #198114If it’s not partial closing, then Sell at TrailUnderValue Stop is perfect, why using any number at all? You don’t have to remove LotSize from your code, just from those two lines.
Oh I can do that. It is only that partial closing *is* allowed because I do that in other systems all the time. But not in this one. So if that would solve for this system(s) then I am fine with it. It is only that the code is made “compatible”.
Roberto, are you possibly confusing “trailing orders” (with formal PRT allowed syntax) which can not be partially closed and which do work in Backtest (I think) but not in Live (nor Demo) ?
Hence, would you have a link to that restriction other then from someone in this forum who thinks it is not allowed ? Again, I am using it all the time (but not in this system).07/30/2022 at 10:44 AM #198116It is only that partial closing *is* allowed because I do that in other systems all the time.
I should be careful with such expressions because matters are too complex to strictly claim this. But for example (and where I use it) :
If one works with CountOfPosition, there’s a bug that forgets to sell a fraction of the total contracts (this is a coincidental situation and rounding error somewhere within PRT). At a next call it would automatically sell the remainder. So now I applied partial closing.
Pseudo code :If Abs(CountOfPosition) > 0 then
Sell Abs(CountOfPosition) Contracts at Value Stop // Would sell 3 contracts at first and 0.69 a second round.
EndifThis is clearly not meant to partially close. But it happens automatically.
Anyway, in this case I am not facing that issue and it is always the full amount. So yeah, leave out the LotSize may help ?07/30/2022 at 10:58 AM #198118As fas as I know only MARKET ordrs can partially close positions, while PENDING orders can’t.
Unless it changed recently (but I fear it did not, as it’s IG who are concerned in updating their engine and they don’t seem to keep much the pace…).
08/01/2022 at 3:31 PM #198293If it’s not partial closing, then Sell at TrailUnderValue Stop is perfect, why using any number at all?
Perfect or not, it does not help (removed the LotSize Contracts). Plenty of entries – zero exits. And in Backtest all still fine. Old running code also still fine.
Of course I keep on having the hunch that it must be me, but then it is not plausible that Backtest still runs as expected. So something must have changed (well, not changed – rather killed).Edit : A hunch to self could be that Trailing Stop orders which should be replaced by the Set At TrailUnderValue Stop are not eliminated either. As if *that* goes wrong first now.
-
AuthorPosts
Find exclusive trading pro-tools on