Placing a sell limit to a sell stop order
Forums › ProRealTime English forum › ProOrder support › Placing a sell limit to a sell stop order
- This topic has 5 replies, 5 voices, and was last updated 3 years ago by
PeterSt.
-
-
12/02/2021 at 5:52 AM #182657
I have a strategy that places a sell stop order. An order last night was rejected because the order level was too close to the market level but subsequently a market order was placed at a much lower level resulting in a loss.The backtest shoed a profit because the entry level was not subject to the same restriction as the live market.
How can I place a limit to the sell stop order
12/02/2021 at 8:57 AM #182659As from attached pic, STOP pending orders are to be used when your entry is at a worse price than current market level, use LIMIT otherwise.
Furthermore you have to check, each time you place anyone of the above kind of orders, that there’s at least a minimum distance required by the broker.
That distance is different among instruments and assests traded and may CHANGE throughout the day.
Since there’s no way to automatically know that distance, following the above guidelines does not prevent the error from occurring again, though more rarely.
Backtest is just a simulation and is not aware of what the broker does, that’s why it can’t deal with such kind of issues.
12/02/2021 at 10:55 AM #182689Hi pdrh,
I also have been struggling with this kind of issues. Specifically having troubles with the stop/limit orders and the errors they give in high spread hours. Sorry to say I haven´t found any solution for that. We can use market orders in that hours or just not trading in that hours but otherwise they tend to give errors. I even still use in live a system that ocasionally stops because of this and I keep reactivating it, but for me that´s a not good solution at all because my systems have money management that restart each time that they stop
By the way, when you activate a system in ProOrder there is a option/box (“order adjustment” or something like that) that is supposed to move your order price when necessary, in theroy just what we need, but it seems to not work at all in these cases.
Please let me know if you found any solution
12/02/2021 at 11:17 AM #18269612/02/2021 at 9:21 PM #182752I think an order rejected by IG does not “exist” for PRT or PRT does not know that the order was rejected by IG.
If PRT does not “know” this, you cannot draw up a code for it.
The only thing you can do is prevent the order from being rejected and you can do so by checking the option “adjust stop” when starting up your system.
You can decide for yourself whether that works or not 🙂
12/03/2021 at 6:00 AM #182757I think an order rejected by IG does not “exist” for PRT or PRT does not know that the order was rejected by IG. If PRT does not “know” this, you cannot draw up a code for it.
Well, the PRT engine/platform knows about it all right or else the “error trap” would not fire (the Strategy surely does not “break” or error-out – it just finishes in a controlled way). However, this is not exposed to us, the user, and therefore we can’t do anything with it.
Something else is that this would be highly prone to error or (recursive) loops, because what tells that the error won’t repeat (with our clumsy code :-)).I even still use in live a system that ocasionally stops because of this and I keep reactivating it,
I agree that it is a complete pain that a Strategy stops (errors-out). Still, the only good solution is prevent it from happening;
With this distance-thing, the remedy would be accepting a higher risk/reward ratio, am I right ? Or actually, and I said that elsewhere the other day, program your own SL and don’t let it decide by the system.If LostEnough then
Sell at Market
Endif
But also have a normal SL which is sufficiently high to avoid the error – and which adds safety in case your calculation of LostEnough fails on you. You see it below, were the active SL in the program is 766 (blue graph) and the technical Set Stop command is way higher at 3292 (you must calculate yourself what is sufficiently high to avoid the error at all times). In the 2nd attachment you see one occurring (at a little higher value – it is all dynamic in my situation); just caused by an Exit Short in this case.If I did not understand the issue correctly, then apologies !
PS: I see I did not catch the blue graph line at all. See 3rd attachment.
-
AuthorPosts
Find exclusive trading pro-tools on