As Bimi has pointed out, please add print statements to your code. For example like this:
May I ask you what are your data1 and data2 series? I would suggest you to create to identical charts, add your strategy to each of them and turn on auto trading on one of them. Then, you can compare print output from these two charts. If you see significant difference please contact MultiCharts support directly so we can analyze the situation.
You can also come to our Live Chat Mon-Fri between 6:30AM and 2PM EST so our customer care specialists can connect to your machine remotely and help you: Customer Support Messenger
MultiCharts - Raising the Trading Standard.
Please send me a private message if you have any further questions about MultiCharts
The following 4 users say Thank You to MultiCharts for this post:
I did add the Print statements as Bimi suggested. I also now added yours as you showed.
My Data1 and Data2 series are as I listed at the top of my Code: Specifically, Data1 = ESU1, Data2 = ESZ1.
I will go onto your Live Chat so that you can observe what happens on my screen. It would probably be more efficient if you just loaded onto your own computer what I have and watched it yourself. But I will do as you say. However, I have to leave right now for a couple of hours, then I'll contact you via the Live Chat. Hope you're still there.
I went to Live Chat on MultiCharts this morning. I asked for 'the best' and I think I got the best: 'Roman'.
He found the problems and seemed to be very knowledgeable, both with my code and all aspects of MultiCharts.
The main problem that was causing the time delays was a setting behind the scenes. Under 'Format Signals/Format/Properties/Advanced' he unchecked 'RealTime-History Matching'. When it was checked, that's what was causing MC to wait on giving a Signal until a tick was received from Data2. This sometimes took many minutes, for Data2 is a far-out contract.
He also cleaned-up my graphs in Data2 and simplified my code a little.
I'm very pleased with what Roman did. I now feel pretty confident with MultiCharts. I've always liked what MC could do. And now it does what I want it to do!
Some further forward-testing and I just may be ready to go again.
Note: The signals produced now are nowhere near as 'good' as what was produced by the program using the wrong setting. But the results are still looking pretty good. I just have to experiment around a little to see what I actually want to do.
THANK YOU AGAIN, ROMAN AND MULTICHARTS.
The following 5 users say Thank You to bobbakerr for this post:
Since I have both MC and TradeStation, I have been following this thread with great interest.
For TradeStation, I mentioned (in early post this thread) the idea of limit or stop offset from the close of prior bar sufficient to create a short delay, so any "optimizing" would not be "misled" by over optimistic assumption of instant transmission of orders and instant promotion to front of line in order book. That is no guarantee of real time being exactly like back testing, but I have found that it can help a lot in making test closer to real time in many cases. Back test usually gets less optimistic, while real time slippage can become less, or not.
With TradeStation, I have problems with trading a data1 by using data2 as proxy, since I, like yourself, did not know how to precisely synchronize "inside the bar" ordering with two data streams using one as a proxy for the other; the ticks will seldom arrive simultaneously in both. TradeStation, I think by default, will wait for the close of data1 or the next tick of data1 if "looking inside bars" before issuing any orders, and I believe TradeStation cannot even deal with data sync for other than time based bars. "TradeStation does not support mixed data intervals for advanced bar types" and "....Does not support look inside bar with advanced bar types"
I was not even aware of the "advanced" features of MultiCharts data syncing, except for the discovery early on that I could chart advanced bar types like Kagi bars for data2 and time bars for data1 on the same chart! I did not have a clue as to how these are really synchronized.....let alone options I could set.
Maybe this will also resolve my own unanswered questions! I was charting with Kagi bars and time bars for the data 2 and data 3 proxies overlaid, and data1 at the top running at 1 minute intervals.....so my stops and limits were reset once every minute maximum, usually much less often, and canceled at the end of a minute unless the signal was "renewed" except for stops or targets for duration of the trade (set at the entry of the trade relative to the entry price), and could enter or exit up to about one minute after I sent out the order (until cancel). TradeStation cancels hypothetical order close of next bar by default for the back testing.
I would suggest trying this experiment: running a chart of SPY ETF for data2 and try another chart with the ETF for data1 to see what a finer grained tick size does to this syncing with various futures....
In proxy signal trading (as I call it anyway), the order prices, stops and limits creating the delayed executions, apply to the data1 only, whereas ordering signals may come from the other data streams as well. Some ETFs might hit stops or limits faster, or emit ordering signals faster due to smaller space batween ticks, particularly the leveraged ones.
The following user says Thank You to Seberbach for this post:
My worst CL slippage was ~6-7 cents if I remember correctly on my IB account however I did not trade cl for long enough to consider myself as an expert.
Also you might aware of this already however not stated in the posts:
beside setting IOG = true for your signal
variables you'd like to be processed tick by tick you shall declare them with "IntrabarPersist" otherwise they will be processed at the first tick of next bar. This might help you with time delay.
If you have 400-500 RT a day than I suggest to use only limit orders for entries to eliminate at least the entry slippage. You'll RT will be less but your slippage as well. Also you can try to exit with limit and configure MC to turn your limit order into market order after 2-5 seconds.
I did see early May the cl going over $1 in matter of seconds and just a minute before I was thinking to go long... lol I would've make money faster for that period than Bill Gates - while that type of a move does not happen very often yet your account have to be able to handle such move if goes against you. Hope it helps.
The following 4 users say Thank You to atata for this post: