Retrieve number of pending orders
Forums › ProRealTime English forum › ProOrder support › Retrieve number of pending orders
- This topic has 8 replies, 3 voices, and was last updated 1 year ago by ZeroCafeine.
-
-
04/17/2023 at 7:14 PM #21342104/18/2023 at 6:06 PM #213453
No, it’s not possible,
But you can easily calculate them yourself, just tally any pending order you place, buy or sellshort, that’s all.
As pending orders are all automatically cancelled each candle, you simply restart tallying them each time.
04/18/2023 at 6:44 PM #213455Hi <span class=”bbp-author-name”>robertogozzi</span>,
Can I append new orders to the existing ones that were created in the last candle instead of cancelling all the orders and recreating after each candle?
04/18/2023 at 9:21 PM #213462ALL pending orders are automatically cancelled each new candle.
If you still need them the next candle you need to place them again.
So, if you place 3 pending orders and want to add 1 more later, then next candle you will have to place 4 pending orders, the prior 3 orders + a new one.
So you do not need to keep a tally to be incremented each time. You simply restart counting from zero each candle, as there are no past orders left pending.
04/18/2023 at 9:30 PM #213464Hi <span class=”bbp-author-name”>robertogozzi</span>
I tested it before on 1 second timeframe, as I have both buy limit and buy stop orders set, during price spikes, sometimes a sell order is sent instead causing me to realize losses. Is this a known issue or bug?
04/18/2023 at 9:36 PM #213465Why a bug?
Pending orders are placed to be triggered when a price is reached.
If it is triggered it’s not a bug, it’s what they have to do.
Returning a loss instead of a profit is not due to being a pending or at market order, but why it has been placed at the wrong time.
04/19/2023 at 6:18 PM #213526Hi <span class=”bbp-author-name”>robertogozzi</span>,
The bug probably lies in the part when the target is set. In IG, you can create an order with target directly but in prorealtime it sends orders without targets. The target is only set when the order is processed.
In my code, there are no stop losses but I have encountered instances when during spikes, the order is triggered and in the next instance, it took a stop loss. So it really puzzles me that it took a loss when my code only sets targets.
04/20/2023 at 4:54 PM #213558I have never experienced such issues. It might be due to GUARANTEED stops or to some LIMITED account types that require a stop loss, but I have no clue.
I suggest asking PRT.
04/23/2023 at 2:26 AM #213621Maybe you can past a part of your code with an exemple on photos where is the problem, if will be better for help you 😊
-
AuthorPosts
Find exclusive trading pro-tools on