Order rejection
Forums › ProRealTime English forum › ProOrder support › Order rejection
- This topic has 12 replies, 4 voices, and was last updated 5 years ago by Johann.
-
-
08/22/2019 at 1:35 PM #105289
Hi,
I was confronted with a order rejection on my last trade. The consequence was that a trade took place 40 – 50 points out of the market on the Wall Street cash. I run the exact same code on another account and there were no problems with the execution, all the trades were done within 7 points from the market price. I would like to avoid this in future and would like to know what I can add in the code to not do the trade when the market price is so far away from the open of the trade candle. The error message suggest to submit a ‘points through current’ order to reduce the likelihood of a price rejection. What does this mean and how can I incorporate this in my code? From the first trade execution 20:00:03 with the price at 26219.2 to the last execution 20:00:11 with the price at 26171.2 and 26181.7 the spread opened with 50 points in 8 seconds. This is crazy especially if you look at the size? If I can not get some assurance that a automated trade can at least be executed close to the open of the trade candle how can you do back testing? See image attached.
08/23/2019 at 2:24 PM #105390Please don’t double post, I deleted your other post in another topic. Please be patient, we try to answer each request one after the other one.
Orders are placed at Open of new candle and since the code is only read at next Close, the only way to test if the current price is too far away from the Open price would be to use an inferior timeframe with TIMEFRAME instruction.
or to use pending orders at desired price, but I don’t know what is the strategy about, so it could not be possible according to how it decides to take new orders.
08/23/2019 at 5:06 PM #105412Hi Nicolas,
Thanks for the response. The strategy is a simple moving average cross over on a hourly time frame. The point is that the instruction was rejected for some reason and when the trade eventually took place the market was 50 points lower 8 seconds after the initial instruction to trade. I did take this up with IG Markets and they are willing to cover a small part of the loss and referred me back to Prorealtime to address the issue and hopefully not let this happen again. You talk about a shorter time frame but this happened within 8 seconds? Do you mean that the strategy should be activated on a one minute time frame and that the trade should only happen on the close of the one minute after the hour to determine how far away the one minute close price is from the close of the hour? My disappointment with Prorealtime is the time and effort one spent on code with the assumption that a trade takes place on the open of the next candle after the conditions are met but in reality this is not true, and you only discover this flaw after you went live and take the loss.
I would like to know if anybody else had this same problem, that you know off I do not believe I am the first ever client of Prorealtime who have experienced this?
08/24/2019 at 10:01 AM #105426instruction was rejected for some reason
What was the Reject message in your Orders list on the Cancelled / Rejected tab?
IG vary the minimum stop distance and often this often leads to rejections, it can even be several rejections … one after the other.
If you post your code on here then somebody may offer some possible reason, without seeing the code we are guessing?
08/25/2019 at 4:10 PM #105521Hi GraHal,
Thank you for your response. It was not a stop loss order it was a Sellshort instruction. The reason for the rejection shows “price not valid” the same kind of thing that happens when you do a manual trade and the moment you clicked the sell instruction the market moved away from the price you clicked on. The instruction was a simple moving average cross over. I used the 20 and 30 day on a hourly timeframe. I am not concerned that the code is wrong I am concerned that after the rejection the order was eventually done 50 points out of the market. If it was possible that you could get the pro real code to identify the price value, in this case the bid it was about to trade on, in your code one can code something that prohibits the trade from taking place if the price falls away. Say for instance if the bid price/offer price is 10 points away from the open of the candle when the instruction was given the trade should not take place.
08/25/2019 at 8:55 PM #105532it was a Sellshort instruction. The reason for the rejection shows “price not valid”
Was the SellShort order at a particular price level?
I am concerned that after the rejection the order was eventually done 50 points out of the market
Does above mean that the sellshort order was filled 50 points lower than your specified price level?
08/25/2019 at 9:20 PM #105533Tip: click on the wrench and add System and version to the Orders Table you show in your original post.
I spent a bit more time studying your Orders table … are you sure you are not confusing / getting mixed up by trades from more than one System??
08/25/2019 at 9:43 PM #105534It would be much easier when reading back (to find a particular statement you made) if you use paragraphs for separate points.
I am finding myself having to read your long large paragraph to try and find the information relevant to what I am investigating / analysing re your problem.
08/25/2019 at 9:53 PM #105535It was not a stop loss order it was a Sellshort instruction
Minimum stop distances come into play when setting a Sellshort Stop order (not just when Orders are stop loss orders).
08/26/2019 at 4:28 AM #105544-No it was only one system.
-It reversed from a long position to a short.
-I cut the position manually after the trade due to the bad price I got.
-Yes the price was filled 50 points lower within 8 seconds since the first trade on the instruction.Like I said I do not have a problem with the instruction it was executed poorly due to IG’s price that fell away at that moment. So the system kept on generating the order until it traded successfully but with no regard to how far the price is below the open of the trade candle. I did take it up with IG and they are prepared to cover half the loss as a goodwill gesture but are not prepared to do it again and told me to take it up with prc.
So all I need is:
Something in my code that protects the order from happening if the price is to far away from the open.
08/26/2019 at 4:44 AM #105545or to use pending orders at desired price, but I don’t know what is the strategy about, so it could not be possible according to how it decides to take new orders.
Hi Nicolas,
Can you help with your above comment please:
The sellshort instruction on the hourly timeframe is:
If average[20](close) crosses over average[30](close) Then
Sellshort 3 contracts at marketHow do I incorporate a desired price in this?
08/26/2019 at 10:44 AM #105561You can try this but might risk missing the trade:
12If average[20](close) crosses over average[30](close) ThenSellshort 3 contracts at average[20](close) stopAlternatively, try using an acceptable buffer, but this might mean that the average entry price of the strategy will be compromised with x points each time:
12345Buffer = 5If average[20](close) crosses over average[30](close) ThenSellshort 3 contracts at (average[20](close) - Buffer) stop08/26/2019 at 1:00 PM #105577 -
AuthorPosts
Find exclusive trading pro-tools on