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.