I used the following workaround:
CODE:
Please log in to see this code.
I occasionally encounter this problem in actual trading.
Is the feature intended to simulate this reality?
Size:
Color:
Is slippage enabled?
Size:
Color:
Size:
Color:
We have no ticket, so it's not a bug (at least officially).
If using Yahoo/Fidelity data (which is likely to be the case with the topic starter), there's no problem entering a limit order at the exact low (which is unrealistic anyway) if you disabled AtLimit order Slippage.
This double precision issue can happen with other data sources (like your BBLoader data) where the data has more digits than the tick (e.g. something like 10.46000004 instead of 10.46).
Size:
Color:
There is a ticket: 19094.
Size:
Color:
Sorry, my bad.
Size:
Color:
I did a little more testing on the data from Fidelity and found the following failed cases.
The slippage was disabled.
Limit buy at 72.10 failed with OHLC = 72.23 72.32 72.091 72.32
However, a limit buy at 72.10001 was executed. In this case the price bought at was 72.10.
Other failed cases were
Buy at 65.6 with OHLC = 65.85 65.85 65.59998 65.6
Buy at 74.20 with OHLC = 74.21.74.22 74.0109 74.03
Size:
Color:
Another case of failure:
Tried to buy IWO at 76.97
bar = 6474, Bars.Date[bar] = 5/4/2010 9:35:00 AM
OHLC = 76.97, 76.97, 76.21, 76.38
Does BuyAtLimit() fail if the limit price is considered to be outside the range of the current Bar?
Size:
Color:
It shouldn't be possible to to create a trade outside a bar's range (wouldn't everyone like to buy GOOG for 50 cents?), but a limit order should execute at the limit price or better. In the previous case, the 76.97 limit order should have executed at the opening price.
It also should have executed at the open if the limit price were at any price above 76.97 too. Note however, that Fidelity's back end will [unfortunately] require that Wealth-Lab limit order be at or below the last trade price, otherwise the order will error out. Generally, that's good for protecting you from a fat-fingered entry, but it definitely not something that's desirable if the market is moving quickly and you really wanted your limit order to execute "at market".
Nonetheless, we've got the bug entered, and it will be investigated and hopefully fixed in the December releaase.
Size:
Color: