Hi there,
Just want to be clear on when an order is sent to the broker when I have two, or more data sets creating the signal and I have selected Real Time History Matching in Advanced Section of Backtesting Tab in Strategy Properties.
Let's say I have:
Data1: 5 minute Futures Index data.
Data2: 5 minute Stock Market Internal data.
and my pseudo code:
if time = 8:35 and Data2 is > n then Buy...
Am I correct in assuming that only when a new tick from the next bars time is recorded on both data sets that the order will be sent to the broker.
So when time stamp is:
Data1 08::36:01
Data2 08:35:59
No order sent...
But
when next time stamp of data2 changes:
Data1 08:36:02
Data2 08:36:02
Order is sent.
Many thanks for any help and clarification,
Anthony
Using Real Time History Matching
- TJ
- Posts: 7743
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2223 times
Re: Using Real Time History Matching
Signal works in Data1.
Unless your code specifies otherwise, other data series are not consulted.
Unless your code specifies otherwise, other data series are not consulted.
Re: Using Real Time History Matching
Hi TJ,
Thank you for your input. I'd rally appreciate your help here...
I'm assuming that MC uses Data time stamps as the feed for TIME function. Not computer time… Am I correct in my assumption?
Maybe an example will make my query clear.
Pseudo Code:
if Time = 0835 and Close of Data2 > 800 then Buy Close Limit;
Data1 E-Mini S&P
timeStamp 08:34:59:000 3500 received by computer 08:34:59:500
timeStamp 08:34:59:500 3501 received by computer 08:34:59:800
timeStamp 08:35:00:000 3502 received by computer 08:35:00:200
Data2 Tick
timeStamp 08:34:59:000 500 received by computer 08:34:59:500
timeStamp 08:34:59:500 900 received by computer 08:34:59:900
timeStamp 08:35:00:000 1000 received by computer 08:35:00:500
Which of the below scenarios is correct when using Real Time History Matching:
Data1 time is used for calculation at 08:35:00:200 with Data1 close of 3501
and data2 close of 500. Therefore no order sent.
Or
Data1 and Data2 time is used for calculation at 08:35:00:500 with Data1 close of 3501
And data2 close of 900. Therefore order sent.
Anthony
Thank you for your input. I'd rally appreciate your help here...
I'm assuming that MC uses Data time stamps as the feed for TIME function. Not computer time… Am I correct in my assumption?
Maybe an example will make my query clear.
Pseudo Code:
if Time = 0835 and Close of Data2 > 800 then Buy Close Limit;
Data1 E-Mini S&P
timeStamp 08:34:59:000 3500 received by computer 08:34:59:500
timeStamp 08:34:59:500 3501 received by computer 08:34:59:800
timeStamp 08:35:00:000 3502 received by computer 08:35:00:200
Data2 Tick
timeStamp 08:34:59:000 500 received by computer 08:34:59:500
timeStamp 08:34:59:500 900 received by computer 08:34:59:900
timeStamp 08:35:00:000 1000 received by computer 08:35:00:500
Which of the below scenarios is correct when using Real Time History Matching:
Data1 time is used for calculation at 08:35:00:200 with Data1 close of 3501
and data2 close of 500. Therefore no order sent.
Or
Data1 and Data2 time is used for calculation at 08:35:00:500 with Data1 close of 3501
And data2 close of 900. Therefore order sent.
Anthony
- TJ
- Posts: 7743
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2223 times
Re: Using Real Time History Matching
You can sent an email to support@multicharts.com for a definitive answer.Hi TJ,
Thank you for your input. I'd rally appreciate your help here...
I'm assuming that MC uses Data time stamps as the feed for TIME function. Not computer time… Am I correct in my assumption?
. . .
Anthony
- Vlada MultiCharts
- Posts: 293
- Joined: 22 Apr 2020
- Has thanked: 8 times
- Been thanked: 76 times
Re: Using Real Time History Matching
Hello AMarsland,
The Time keyword returns a numerical value indicating the closing time of the current bar.
On the screenshot your ticks are numbered from 1 to 6 and are placed in the order of being received.
On the main data series, tick-3:
will close a 5-minute bar after receiving tick-5:
The script will be calculated and the order will be placed in the buffer.
On the additional data series, tick-4:
will close the 5-minute bar after receiving tick-6
The script will be calculated, according to the conditions of your script the order calculated on Close Data1 and Data2 will be sent on the close of the bar on Data2.
Please check the attached screenshot for more details.
The additional keyword is:
computerdatetime - Returns a double-precision decimal DateTime value indicating the computer's current date and time.
The Time keyword returns a numerical value indicating the closing time of the current bar.
On the screenshot your ticks are numbered from 1 to 6 and are placed in the order of being received.
On the main data series, tick-3:
Code: Select all
timeStamp 08: 34: 59: 500 3501 received by computer at 08: 34: 59: 800
Code: Select all
timeStamp 08:35:00: 000 3502 received by computer at 08: 35: 00: 200
On the additional data series, tick-4:
Code: Select all
timeStamp 08: 34: 59: 500 900 received by computer at 08:34:59 : 900
Code: Select all
timeStamp 08: 35: 00: 000 1000 received by computer at 08: 35: 00: 500
Please check the attached screenshot for more details.
The additional keyword is:
computerdatetime - Returns a double-precision decimal DateTime value indicating the computer's current date and time.