Bug with Calculation of Signals...
Bug with Calculation of Signals...
I have my trading system applied to my chart during the day and have it trade on auto with IB.....Everything works fine.....I see the trades on the chart and IB executes.....But after I shut it down at the end of the day and bring up everything later or the next day, with the system still displayed on the chart, the buy and sell signals are completly different than they were previously in realtime....This is a major bug! Sometimes the buy and sell signals are way off than they really were...Why would it calculate the signals differently if its the same data? Now I question any backtesting Ive done with MC! Why would the signals be one way realtime and then different after I reload the chart....
- Andrew Kirillov
- Posts: 1589
- Joined: 28 Jul 2005
- Has thanked: 2 times
- Been thanked: 31 times
- Contact:
Im running the latest beta....But after alot of research I found that its the data being pulled up.....Fow example, the low in YMU7 on 7/25 was 13731, after the chart was closed and reloaded the low was shown as 13737, and also many other bars had different levels than originally traded in realtime, which means my signals, which are based on ticks, I use a 15 point chart, are being calculated on different levels, so thats why my results are different. Now I still dont know if this is caused by MC storing bad data or IB sending bad after a reload. Ive cleared the cache of the symbol and reloaded the data from IB and still the the bad ticks, so I imagine its an IB problem and I must look for a new data provider....But if the data in realtime is coming in good, why dosent MC store the good data and just pull that up after i reload?
- Andrew Kirillov
- Posts: 1589
- Joined: 28 Jul 2005
- Has thanked: 2 times
- Been thanked: 31 times
- Contact:
It is very good you've diagnosed the problem. I have two important comments.
1. If you use point bars, it is important to know that start point is critical. It means that you should use From-To in Format Symbol dialog. If you use Bars back your starting point changes and the charts will be different. It is natural for range based charts.
2. My previous comment about the same signals is not completely correct.
It is correct for signals that enter on open or close of a bar.
All signals that enter inside the bar will be different on real-time and history.
It is natural since historical back-testing has a primitive assumption for price movement. at the same time real-time price movement is different.
This is what TRAD says about this:
Strategy Orders vs Real-World Orders
As you begin working with TS, it's important to understand that an entry or exit 'order' in a strategy is not exactly the same thing as placing an order in the real-world using the Order Bar. That's because strategy orders are also applied to historical data as well as to current market data. And when applying strategy orders to historical data, the TS strategy-engine uses the available price data to see if the order could have been filled and marks the bar chart with arrows to indicate where that fill might have occurred.
By comparison, a real-world order is submitted to the market and is filled only when an actual trade occurs. And as you may have experienced, sometimes the market may hit your price without your order being filled because there were many other orders already in the market at the same price.
It's especially important to understand this difference between strategy orders and real-world orders when it comes time to automate a strategy since it's very likely that the actual market fills will not exactly match those fills approximated by the strategy as it plays out in real-time.
1. If you use point bars, it is important to know that start point is critical. It means that you should use From-To in Format Symbol dialog. If you use Bars back your starting point changes and the charts will be different. It is natural for range based charts.
2. My previous comment about the same signals is not completely correct.
It is correct for signals that enter on open or close of a bar.
All signals that enter inside the bar will be different on real-time and history.
It is natural since historical back-testing has a primitive assumption for price movement. at the same time real-time price movement is different.
This is what TRAD says about this:
Strategy Orders vs Real-World Orders
As you begin working with TS, it's important to understand that an entry or exit 'order' in a strategy is not exactly the same thing as placing an order in the real-world using the Order Bar. That's because strategy orders are also applied to historical data as well as to current market data. And when applying strategy orders to historical data, the TS strategy-engine uses the available price data to see if the order could have been filled and marks the bar chart with arrows to indicate where that fill might have occurred.
By comparison, a real-world order is submitted to the market and is filled only when an actual trade occurs. And as you may have experienced, sometimes the market may hit your price without your order being filled because there were many other orders already in the market at the same price.
It's especially important to understand this difference between strategy orders and real-world orders when it comes time to automate a strategy since it's very likely that the actual market fills will not exactly match those fills approximated by the strategy as it plays out in real-time.
-
- Posts: 3
- Joined: 29 May 2021
- Has thanked: 1 time
- Been thanked: 1 time
Re: Bug with Calculation of Signals...
I got the same issue. After recalculate the chart, the live trading's entry and exit are different from backtesting. I use IBKR too. Not sure if it is the IBKR's data or Multicharts's issue... It is really difficult to reproduce the issue since it take days to entry my position and it can only be seen in live trading. Looks like this issue is here for 15+ years...
- Polly MultiCharts
- Posts: 202
- Joined: 20 Jul 2022
- Has thanked: 1 time
- Been thanked: 56 times
Re: Bug with Calculation of Signals...
Hello capitaldog,
It's normal to see different results in backtesting and live trading.
Backtesting is a great analysis tool, but it has certain limitations as any other simulation, some of the real trading factors simply cannot be replicated on historical data. Signal calculation also differs depending on the current environment. Here is more info about signal calculation.
For more info you might also check our Backtesting vs Live Trading article.
It's normal to see different results in backtesting and live trading.
Backtesting is a great analysis tool, but it has certain limitations as any other simulation, some of the real trading factors simply cannot be replicated on historical data. Signal calculation also differs depending on the current environment. Here is more info about signal calculation.
For more info you might also check our Backtesting vs Live Trading article.
- Polly MultiCharts
- Posts: 202
- Joined: 20 Jul 2022
- Has thanked: 1 time
- Been thanked: 56 times
Re: Bug with Calculation of Signals...
Hello Tibouss,
Backtesting provides you with a general idea of how your strategy can behave. This information is not to be solely relied on for making decisions. You can use the following features to bring your Backtesting results closer to the real-time strategy behavior:
Backtesting provides you with a general idea of how your strategy can behave. This information is not to be solely relied on for making decisions. You can use the following features to bring your Backtesting results closer to the real-time strategy behavior:
Re: Bug with Calculation of Signals...
Actually the problem doesn't come from Multicharts or any of it's parameters, but from the datas.
For example on a 5 min chart for a bar the low will be at X while using real time datas.
Then, when you come back to the same chart and reload the datas the same low will ba at Y.
Historical datas are adjusted and a bit different from the real time datas. So 2 sets of datas will inevitably gives you 2 different signals...
For example on a 5 min chart for a bar the low will be at X while using real time datas.
Then, when you come back to the same chart and reload the datas the same low will ba at Y.
Historical datas are adjusted and a bit different from the real time datas. So 2 sets of datas will inevitably gives you 2 different signals...