Please explain how in bar ticks are processed  [SOLVED]

Questions about MultiCharts .NET and user contributed studies.
davewolfs
Posts: 89
Joined: 06 Feb 2013
Has thanked: 2 times
Been thanked: 11 times

Please explain how in bar ticks are processed

Postby davewolfs » 15 Mar 2013

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?

User avatar
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]

Postby Henry MultiСharts » 18 Mar 2013

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.
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?
There is no way to track/capture the ticks for each bar in playback.
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.

davewolfs
Posts: 89
Joined: 06 Feb 2013
Has thanked: 2 times
Been thanked: 11 times

Re: Please explain how in bar ticks are processed

Postby davewolfs » 18 Mar 2013

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?

User avatar
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

Postby Henry MultiСharts » 19 Mar 2013

Environment.IsRealTimeCalc = true indicates if there‘s an ongoing real-time calculation.
Environment.IsRealTimeCalc = false indicates calculation on historical data.

davewolfs
Posts: 89
Joined: 06 Feb 2013
Has thanked: 2 times
Been thanked: 11 times

Re: Please explain how in bar ticks are processed

Postby davewolfs » 19 Mar 2013

Environment.IsRealTimeCalc = true indicates if there‘s an ongoing real-time calculation.
Environment.IsRealTimeCalc = false indicates calculation on historical data.
Thank you Henry.

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.

User avatar
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

Postby Henry MultiСharts » 19 Mar 2013

Thank you Henry.
But How do I see what is the suggested method to see what is in the last tick?
You need to check that this is realtime calculation and this is the last bar on the chart

Code: Select all

if Environment.IsRealTimeCalc = true && Bars.LastBarOnChart
whether or not it was at the bid/ask.
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.

davewolfs
Posts: 89
Joined: 06 Feb 2013
Has thanked: 2 times
Been thanked: 11 times

Re: Please explain how in bar ticks are processed

Postby davewolfs » 19 Mar 2013

Thank you Henry.
But How do I see what is the suggested method to see what is in the last tick?
You need to check that this is realtime calculation and this is the last bar on the chart

Code: Select all

if Environment.IsRealTimeCalc = true && Bars.LastBarOnChart
whether or not it was at the bid/ask.
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.
Henry,

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?

User avatar
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

Postby Henry MultiСharts » 20 Mar 2013

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.
Attachments
Test_lastTickVolume.pln
(1.14 KiB) Downloaded 534 times

davewolfs
Posts: 89
Joined: 06 Feb 2013
Has thanked: 2 times
Been thanked: 11 times

Re: Please explain how in bar ticks are processed

Postby davewolfs » 20 Mar 2013

Thank you Henry.

One quick question what is the difference between a bars volume and truevolume?

User avatar
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

Postby Henry MultiСharts » 20 Mar 2013

One quick question what is the difference between a bars volume and truevolume?
Volume for daily resolution and higher resolutions is total volume, for other resolutions you need to use upvolume. Truevolume is always total volume.


Return to “MultiCharts .NET”