Hello,
I am looking for an explanation on how in bar ticks are processed. Specifically, if we look at the BarMembers class there is the field TickID along with TickTradeSide.
I'd like to know the following.
1. When loading historical data. How can one view the sequence of these values per bar.
2. When running the replay or running real time, how do these values change per bar?
I have a calculation that is based on bid/ask information but is different from cumulative delta, is there anyway that I can use these various members in order to track/capture the the ticks for each bar.
Let me give some concrete examples.
If I have a 1000 tick bar or 5 tick range bar. I want the ability to see the entire sequence of ticks that took place in those bars. Is this possible, if so how?
Please explain how in bar ticks are processed [SOLVED]
- Henry MultiСharts
- Posts: 9165
- Joined: 25 Aug 2011
- Has thanked: 1264 times
- Been thanked: 2957 times
Re: Please explain how in bar ticks are processed [SOLVED]
TickID is assigned by MultiCharts only to ticks received in realtime.
Historical bars with the same timestamp are written to the database according to the order they have been received/imported.
In backtesting you can enable extended backtesting mode+bar magnifier to achieve this goal. If you want to add additional calculations in backtesting you can also tun on IOG. Here is how it works:How Signals are Calculated
In realtime you just need to enable extended backtesting mode. Turn on IOG if you need tick by tick calcualtion.
Historical bars with the same timestamp are written to the database according to the order they have been received/imported.
There is no way to track/capture the ticks for each bar in playback.I have a calculation that is based on bid/ask information but is different from cumulative delta, is there anyway that I can use these various members in order to track/capture the the ticks for each bar.
Let me give some concrete examples.
If I have a 1000 tick bar or 5 tick range bar. I want the ability to see the entire sequence of ticks that took place in those bars. Is this possible, if so how?
In backtesting you can enable extended backtesting mode+bar magnifier to achieve this goal. If you want to add additional calculations in backtesting you can also tun on IOG. Here is how it works:How Signals are Calculated
In realtime you just need to enable extended backtesting mode. Turn on IOG if you need tick by tick calcualtion.
Re: Please explain how in bar ticks are processed
Henry,
I am interested in knowing how to determine what was the last tick processed in real time.
Should one be using the DATALoader, comparing the current state and previous state of the Bar?
What is the recommend way to look at the most recent tick?
I am interested in knowing how to determine what was the last tick processed in real time.
Should one be using the DATALoader, comparing the current state and previous state of the Bar?
What is the recommend way to look at the most recent tick?
- Henry MultiСharts
- Posts: 9165
- Joined: 25 Aug 2011
- Has thanked: 1264 times
- Been thanked: 2957 times
Re: Please explain how in bar ticks are processed
Environment.IsRealTimeCalc = true indicates if there‘s an ongoing real-time calculation.
Environment.IsRealTimeCalc = false indicates calculation on historical data.
Environment.IsRealTimeCalc = false indicates calculation on historical data.
Re: Please explain how in bar ticks are processed
Thank you Henry.Environment.IsRealTimeCalc = true indicates if there‘s an ongoing real-time calculation.
Environment.IsRealTimeCalc = false indicates calculation on historical data.
But How do I see what is the suggested method to see what is in the last tick?
Eg. What time did the tick happen at, it's price. Volume and whether or not it was at the bid/ask.
- Henry MultiСharts
- Posts: 9165
- Joined: 25 Aug 2011
- Has thanked: 1264 times
- Been thanked: 2957 times
Re: Please explain how in bar ticks are processed
You need to check that this is realtime calculation and this is the last bar on the chartThank you Henry.
But How do I see what is the suggested method to see what is in the last tick?
Code: Select all
if Environment.IsRealTimeCalc = true && Bars.LastBarOnChart
The information is provided for the data series your study is based on. So if your study is based on Ask data series-it will be a tick at ask.whether or not it was at the bid/ask.
Re: Please explain how in bar ticks are processed
Henry,You need to check that this is realtime calculation and this is the last bar on the chartThank you Henry.
But How do I see what is the suggested method to see what is in the last tick?Code: Select all
if Environment.IsRealTimeCalc = true && Bars.LastBarOnChart
The information is provided for the data series your study is based on. So if your study is based on Ask data series-it will be a tick at ask.whether or not it was at the bid/ask.
Can you please show an example of how to see the volume from the last tick was sent through. I have asked the same question 3 different ways now, perhaps I am not explaining myself properly.
If my bar is a 5 minute bar and it is set to calculate on every tick. and IsRealTimeCalc is true and it is also the lastbar on the chart. How can I see what the value was for the last tick that came through?
- Henry MultiСharts
- Posts: 9165
- Joined: 25 Aug 2011
- Has thanked: 1264 times
- Been thanked: 2957 times
Re: Please explain how in bar ticks are processed
Attached is a sample code provided by our coder. This indicator shows the last tick's volume on the subchart.
Make sure you have the option "Skip identical ticks" disabled in Format->Study-> Format "Test_lastTickVolume.pln" ->Properties.
Make sure you have the option "Skip identical ticks" disabled in Format->Study-> Format "Test_lastTickVolume.pln" ->Properties.
- Attachments
-
- Test_lastTickVolume.pln
- (1.14 KiB) Downloaded 537 times
- Henry MultiСharts
- Posts: 9165
- Joined: 25 Aug 2011
- Has thanked: 1264 times
- Been thanked: 2957 times
Re: Please explain how in bar ticks are processed
Volume for daily resolution and higher resolutions is total volume, for other resolutions you need to use upvolume. Truevolume is always total volume.One quick question what is the difference between a bars volume and truevolume?