Bug with Calculation of Signals...

Questions about MultiCharts and user contributed studies.
Guest

Bug with Calculation of Signals...

Postby Guest » 25 Jul 2007

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....

Guest

Postby Guest » 25 Jul 2007

So is it calculating bad signals realtime?
or calculating bad signals after the fact?
or is it different data thats being pulled up after a shutdown?

User avatar
Andrew Kirillov
Posts: 1589
Joined: 28 Jul 2005
Has thanked: 2 times
Been thanked: 31 times
Contact:

Postby Andrew Kirillov » 27 Jul 2007

The signals always should be the same.
1. What version are you running?
2. Could you send us your strategy and workspace?

Guest

Postby Guest » 27 Jul 2007

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?

User avatar
Andrew Kirillov
Posts: 1589
Joined: 28 Jul 2005
Has thanked: 2 times
Been thanked: 31 times
Contact:

Postby Andrew Kirillov » 27 Jul 2007

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.

getting
Posts: 21
Joined: 18 Jul 2007

Postby getting » 28 Jul 2007

sign up at [opentick.com] , and see if u still have the same problem...
free of charge for YM, past couple of weeks the datafeed had been dead on accurate...volume and price.

capitaldog
Posts: 3
Joined: 29 May 2021
Has thanked: 1 time
Been thanked: 1 time

Re: Bug with Calculation of Signals...

Postby capitaldog » 04 Aug 2023

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...

User avatar
Polly MultiCharts
Posts: 189
Joined: 20 Jul 2022
Has thanked: 1 time
Been thanked: 53 times

Re: Bug with Calculation of Signals...

Postby Polly MultiCharts » 04 Aug 2023

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.

Tibouss
Posts: 30
Joined: 26 May 2022
Has thanked: 7 times
Been thanked: 1 time

Re: Bug with Calculation of Signals...

Postby Tibouss » 05 Aug 2023

I never had the same trades between backtesting and live trading using IB data feed...

User avatar
Polly MultiCharts
Posts: 189
Joined: 20 Jul 2022
Has thanked: 1 time
Been thanked: 53 times

Re: Bug with Calculation of Signals...

Postby Polly MultiCharts » 07 Aug 2023

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:

Tibouss
Posts: 30
Joined: 26 May 2022
Has thanked: 7 times
Been thanked: 1 time

Re: Bug with Calculation of Signals...

Postby Tibouss » 17 Aug 2023

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...


Return to “MultiCharts”