Price Improvement
- Henry MultiСharts
- Posts: 9165
- Joined: 25 Aug 2011
- Has thanked: 1264 times
- Been thanked: 2958 times
- Henry MultiСharts
- Posts: 9165
- Joined: 25 Aug 2011
- Has thanked: 1264 times
- Been thanked: 2958 times
Re: Price Improvement
The case is not in the Backtesting assumption. It has nothing to do with this situation.
It is verified that the price went through the order X amount of points and the order is filled on the nearest actual price present on the chart that satisfies the limit order execution conditions. It looks like you have IOG enabled for this situation. Here is how it works:
Calculation on historical data. IOG enabled. Bar Magnifier disabled.
The script is calculated four times on OHLC of the bar. It is considered that all prices were within the bar (Intra-bar Price Movement Assumption is used). Order is filled on any price within the bar with the step (minmove/pricescale).
As Open of the bar satisfies the limit order execution condition-the order is filled right on the open.
It is verified that the price went through the order X amount of points and the order is filled on the nearest actual price present on the chart that satisfies the limit order execution conditions. It looks like you have IOG enabled for this situation. Here is how it works:
Calculation on historical data. IOG enabled. Bar Magnifier disabled.
The script is calculated four times on OHLC of the bar. It is considered that all prices were within the bar (Intra-bar Price Movement Assumption is used). Order is filled on any price within the bar with the step (minmove/pricescale).
As Open of the bar satisfies the limit order execution condition-the order is filled right on the open.
Re: Price Improvement
bar magnifier was turned on.
- Attachments
-
- 2013-10-17_1202_001.png
- (205.77 KiB) Downloaded 1090 times
- Henry MultiСharts
- Posts: 9165
- Joined: 25 Aug 2011
- Has thanked: 1264 times
- Been thanked: 2958 times
Re: Price Improvement
MAtricks, the fact that Bar Magnifier was turned on does not change the backtesting results in this particular case. With the bar magnifier turned on the order can be filled on each bar of the detailed data series selected in bar magnifier. In your case the order is filled on the nearest actual price present on the chart that satisfies the limit order execution conditions.
Re: Price Improvement
I think the disagreements we're having is me talking about REAL trading -vs- Multicharts SIMULATION and you're talking about my interpretation of Multicharts simulation -vs- your knowledge of Multicharts simulation?
Okay, let's walk through this in real time:
-We're on bar1.
-We have code preset to buy a limit order on bar2 at the close price of bar1.
-Bar1 closes downward. Bar2 opens 1 tick below the close of bar1.
-Our order was for the close price of bar1 which is now thrown into the market. Since our buy limit order is above market price, it be filled immediately. Even though the market price is at the open of bar2 our order will still be filled at close price of bar1 (c[1]) 95% of the time. That is live trading... which is what I think we should be attempting to simulate? Filling at the open price of bar2 just doesn't happen in live trading!
I understand that MC is built differently and this is expected behavior which is my entire point... it's built in a very optimistic way of providing us with "price improvement" whenever there is the possibility -any time there is a gap in price and we have an order on one side of it, MC ignores the gap and the fact that there ARE buy/sell orders within the gap and provides us with the most optimistic "fill" which is the least realistic simulation.
There are all kinds of these little one tick bugs that do not simulate the real market whatsoever. Most modern platforms have the option to only **Fill at the Limit Price and No Better** which is a much more realistic approach which would be the correction I'd suggest to the hard working MC team.
To sum up the limit order issues:
1. Limit orders filling with a 1 tick improvement from opens and closes
2. Limit orders filling at the top/bottom of a gab which would never happen in real life
Correction needed:
Fill At Limit Price and No Better option which will fix almost all limit order issues that I can think of
Okay, let's walk through this in real time:
-We're on bar1.
-We have code preset to buy a limit order on bar2 at the close price of bar1.
-Bar1 closes downward. Bar2 opens 1 tick below the close of bar1.
-Our order was for the close price of bar1 which is now thrown into the market. Since our buy limit order is above market price, it be filled immediately. Even though the market price is at the open of bar2 our order will still be filled at close price of bar1 (c[1]) 95% of the time. That is live trading... which is what I think we should be attempting to simulate? Filling at the open price of bar2 just doesn't happen in live trading!
I understand that MC is built differently and this is expected behavior which is my entire point... it's built in a very optimistic way of providing us with "price improvement" whenever there is the possibility -any time there is a gap in price and we have an order on one side of it, MC ignores the gap and the fact that there ARE buy/sell orders within the gap and provides us with the most optimistic "fill" which is the least realistic simulation.
There are all kinds of these little one tick bugs that do not simulate the real market whatsoever. Most modern platforms have the option to only **Fill at the Limit Price and No Better** which is a much more realistic approach which would be the correction I'd suggest to the hard working MC team.
To sum up the limit order issues:
1. Limit orders filling with a 1 tick improvement from opens and closes
2. Limit orders filling at the top/bottom of a gab which would never happen in real life
Correction needed:
Fill At Limit Price and No Better option which will fix almost all limit order issues that I can think of
Re: Price Improvement
The opposite issue with market orders which cost us a the spread. If we place a market order at 100, a simulation will fill it at 100. This is not realistic! A market order will fill you at the purchase price (100) +/- the spread. Multicharts provides us with a "slippage" and/or "commission" option to include the price of the tick we lost, but this is no where near accurate, in fact it's completely inaccurate.
Market Order Scenario 1:
*Price is at 100, we BUY with a market order profit target of 10 ticks*
Multicharts simulation:
-Buy market order at 100, with a profit taken at 110
Real world:
-Buy market order at 101, with a profit taken at 111, but realistically filled only after price reaches 112
See how that can be overly optimistic.. with every trade? A back-test with 1000 trades is 1000 trades trading at the wrong price... offsetting the P/L with slippage isn't realistic. It needs to actually occur at the simulated execution.
1 more time..
Market Order Scenario 2:
*Buy this bar on close with a 1 tick profit target* -(Close price of bar1 is 100)
Multicharts simulation:
-buy at 100, profit taken at 101
Real world:
-Buy at 101, profit taken at 102 but realistically filled only after price reaches 103
Correction:
Provide the option to include a Fill At [X] TICKS above BUY Market Orders and Fill At [X] TICKS below SELL Market Orders.
So the price improvement happens with both kinds of trades.. We're always 1 tick off.. ..
Market Order Scenario 1:
*Price is at 100, we BUY with a market order profit target of 10 ticks*
Multicharts simulation:
-Buy market order at 100, with a profit taken at 110
Real world:
-Buy market order at 101, with a profit taken at 111, but realistically filled only after price reaches 112
See how that can be overly optimistic.. with every trade? A back-test with 1000 trades is 1000 trades trading at the wrong price... offsetting the P/L with slippage isn't realistic. It needs to actually occur at the simulated execution.
1 more time..
Market Order Scenario 2:
*Buy this bar on close with a 1 tick profit target* -(Close price of bar1 is 100)
Multicharts simulation:
-buy at 100, profit taken at 101
Real world:
-Buy at 101, profit taken at 102 but realistically filled only after price reaches 103
Correction:
Provide the option to include a Fill At [X] TICKS above BUY Market Orders and Fill At [X] TICKS below SELL Market Orders.
So the price improvement happens with both kinds of trades.. We're always 1 tick off.. ..
- Andrew MultiCharts
- Posts: 1587
- Joined: 11 Oct 2011
- Has thanked: 931 times
- Been thanked: 559 times
Re: Price Improvement
Do you mean that your buy order can be filled at ask price that is above the current (second) bar open price in reality?Okay, let's walk through this in real time:
-We're on bar1.
-We have code preset to buy a limit order on bar2 at the close price of bar1.
-Bar1 closes downward. Bar2 opens 1 tick below the close of bar1.
-Our order was for the close price of bar1 which is now thrown into the market. Since our buy limit order is above market price, it be filled immediately. Even though the market price is at the open of bar2 our order will still be filled at close price of bar1 (c[1]) 95% of the time. That is live trading... which is what I think we should be attempting to simulate? Filling at the open price of bar2 just doesn't happen in live trading!
- Andrew MultiCharts
- Posts: 1587
- Joined: 11 Oct 2011
- Has thanked: 931 times
- Been thanked: 559 times
Re: Price Improvement
I hear you. We will discuss it with our management. Meanwhile, please leave us such feature request.
Correction:
Provide the option to include a Fill At [X] TICKS above BUY Market Orders and Fill At [X] TICKS below SELL Market Orders.
Re: Price Improvement
No, I'm saying that the order will be filled where the limit order was placed, not below it as most simulations seem to show.Do you mean that your buy order can be filled at ask price that is above the current (second) bar open price in reality?
If I place a buy order at 100 tonight and the market gaps down to 99, I will still be filled at 100 in live trading. I guess I see these improvements a lot since I use Multicharts' range (point) bars which have a "gap" of 1 tick between each bar to make the range bars more realistic.
All in all, I just want the limit orders to be "filled" in back-tests at the price that they were placed at with no improvement.
- Andrew MultiCharts
- Posts: 1587
- Joined: 11 Oct 2011
- Has thanked: 931 times
- Been thanked: 559 times
Re: Price Improvement
Will be implemented. Cannot guarantee at the moment, but should be available in MC 9.0. Similar to TS "Market Order Assumption" for backtesting.
Correction:
Provide the option to include a Fill At [X] TICKS above BUY Market Orders and Fill At [X] TICKS below SELL Market Orders.
- Andrew MultiCharts
- Posts: 1587
- Joined: 11 Oct 2011
- Has thanked: 931 times
- Been thanked: 559 times
Re: Price Improvement
I believe we misunderstand each other again.No, I'm saying that the order will be filled where the limit order was placed, not below it as most simulations seem to show.
If I place a buy order at 100 tonight and the market gaps down to 99, I will still be filled at 100 in live trading. I guess I see these improvements a lot since I use Multicharts' range (point) bars which have a "gap" of 1 tick between each bar to make the range bars more realistic.
All in all, I just want the limit orders to be "filled" in back-tests at the price that they were placed at with no improvement.
A buy order is filled when there is an ask (offer) at the specified level. In your example, the order can be filled at 100 only if there is required ask with required volume at level 100. Do you agree with that?
Re: Price Improvement
I agree that an Ask has to be there for a buy to be filled.
Just because multicharts' point bars simulate a gap between each bar, doesn't mean there's no orders there.
Also, if there's a gap in actual price, this doesn't mean that there were no asks there.. it just means there were no asks filled there whereas if we had a buy order sitting there, any asks in real time would in fact fill the gap.
Just because multicharts' point bars simulate a gap between each bar, doesn't mean there's no orders there.
Also, if there's a gap in actual price, this doesn't mean that there were no asks there.. it just means there were no asks filled there whereas if we had a buy order sitting there, any asks in real time would in fact fill the gap.
Re: Price Improvement
Awesome! I thought you guys would come through with this one I'll be looking for it in a beta and post back here with any improvements I can think of.Will be implemented. Cannot guarantee at the moment, but should be available in MC 9.0. Similar to TS "Market Order Assumption" for backtesting.
Correction:
Provide the option to include a Fill At [X] TICKS above BUY Market Orders and Fill At [X] TICKS below SELL Market Orders.
- Andrew MultiCharts
- Posts: 1587
- Joined: 11 Oct 2011
- Has thanked: 931 times
- Been thanked: 559 times
Re: Price Improvement
I agree that an Ask has to be there for a buy to be filled.
Extended Backtesting Mode using additional Ask and Bid series should be helpful for you in this case.Also, if there's a gap in actual price, this doesn't mean that there were no asks there.. it just means there were no asks filled there whereas if we had a buy order sitting there, any asks in real time would in fact fill the gap.
I believe the "point original" resolution may be the one you need.Just because multicharts' point bars simulate a gap between each bar, doesn't mean there's no orders there.