order level too close to market level with limit buy order
Forums › ProRealTime English forum › ProOrder support › order level too close to market level with limit buy order
- This topic has 7 replies, 2 voices, and was last updated 8 years ago by Nicolas.
-
-
09/16/2016 at 7:56 AM #13151
Good day,
Some help please.
I have an automated trading system that uses a limit price to generate buy orders:
12price=close-(0.5*AverageTrueRange[10](close))buy nrcontracts contracts at price limit“The order level you have requested is too close to the current market level. The minimum distance for this market is 0 per point.”
And/or
“Unattached limit trigger level too close to the market”
This then causes the trading system to stop.
How do I change my system to avoid these errors?
Regards
Stefan
09/16/2016 at 8:44 AM #13153You have to add a price distance between the current close and your order price limit. You are surely trying to put a limit order inside the spread, that’s why it gives you an error.
So if you know the spread of the current instrument is 2 points, you can code it like this:
12spread = 2price=close-(0.5*AverageTrueRange[10](close)+(spread*pipsize))09/18/2016 at 5:37 PM #1323709/18/2016 at 5:40 PM #13238Enlarge the spread variable to the maximum you can afford for your pending orders to still be accurate (valid) for your strategy. There is no ideal solution I’m afraid, since there is no spread instruction in PRT language… still.
09/29/2016 at 5:09 PM #13922@Nicolas, et al.,
This is from an automated long-only system that runs on stocks on a daily timeframe. CFD, not spreadbetting account.
PRT checks the buy conditions at the end of the close of the daily candle, and if met, then tries to place a limit order on the open of the next candle (open of the market the next day) – PRT default/only way of operating (enter/place order at next bar open).
The problem seems to be that if the ask/bid move below the level where I want to place the order (for example during the premarket auction), when PRT tries to place the order, it is rejected if the limit order level is above the ask/bid level as it no longer meets the definition (criteria) of a limit order. It looks like PRT then keeps on sending the order, and as soon as the ask/bid move back above the limit level, the order is accepted and placed.
I don’t care so much about the order being rejected and resent, but for some reason PRT then (sometimes) sees this as a significant enough problem to then stop the trading system.
I don’t know how to code around this – I do not think it is possible. PRT checks the conditions on the current candle, and then tries to place the order on the next. So, whatever I code will be checked on the previous (incorrect) candle. Agreed?
If I could place an order by specifying a level, without specifying whether it is a limit or stop order, then I don’t think this would happen. Unfortunately, PRT does not accept BUY x CASH at price, without specifying LIMIT or STOP.
Basically, I want a buy order that is triggered if the price trades through a specific level. I do not care if it trades up through the level, or down through the level.
Any ideas?
Stef
09/29/2016 at 7:20 PM #13925If the price has moved between the conditions check (at Close) and pending orders place on market (at next Open), you cannot do anything against this.
This is typically one of the problem met while not trading with ticks. This kind of problem will be solved within the multi timeframe support that will come soon or later.
Of course, if your strategy deals with 1s or 10s timeframe, you are not so affected by this ProOrder behaviour.
09/30/2016 at 6:57 AM #1395009/30/2016 at 7:25 AM #13954 -
AuthorPosts
Find exclusive trading pro-tools on