Historical function data

Questions about MultiCharts and user contributed studies.
Gregorian
Posts: 23
Joined: 10 Jan 2018
Has thanked: 3 times
Been thanked: 7 times

Historical function data

Postby Gregorian » 16 May 2018

A function and indicator pair I use provides market depth data using the DOM calls. Market depth data is not stored in the historical feed. However, if one leaves a chart running with the DOM indicator(s) on it, the DOM data is exported along with the OHLC data, so it is savable that way.

Is there a way to load or otherwise use this historical DOM data in functions? Or is there a way to call an indicator as though it were a function, thereby making it possible to access data remaining on the chart even if it has not been saved? Otherwise I see no way to programmatically access this historic DOM data, even if a few days' worth is visible to you on the chart from the indicator. All you can ever call is the current bar's data, so optimizations, backtests, and even calling the previous bar(s)' data is not possible.

MAZINGUER
Posts: 75
Joined: 06 Jan 2017
Has thanked: 9 times
Been thanked: 25 times

Re: Historical function data

Postby MAZINGUER » 17 May 2018

Hi Gregorian,
There is no historical data of market depth.
But if I'm not wrong, if you stop running on a chart, an indicator based on this market depth data, if you'll have access to those historical data loaded while the indicator was running.
Another issue is the case of optimizations, because you can not optimize variables that depend on this depth data.
You can try using the Market Data Playback.
Then you will have to perform the optimizations one by one ... that is, if you have a variable that can take five values ... you will have to execute the playback five times.
If what you have are two variables and each one can take three values, because you will have to execute it nine times.
It's just an idea. I don´t know if this can work

User avatar
TJ
Posts: 7740
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 1033 times
Been thanked: 2221 times

Re: Historical function data

Postby TJ » 17 May 2018

The volume of data in the market depth is probably 50 times or even 100 times of each tick data.
Your computer/database might be challenged to handle such massive volume.

Look carefully,
at each moment, for each one tick, there are 10 levels of bid and ask on each side. And each of the bid and ask, the price and volume change continuously in real time. Your chart only captures a split moment of the battle happened during that bar's duration.

Gregorian
Posts: 23
Joined: 10 Jan 2018
Has thanked: 3 times
Been thanked: 7 times

Re: Historical function data

Postby Gregorian » 17 May 2018

But if I'm not wrong, if you stop running on a chart, an indicator based on this market depth data, if you'll have access to those historical data loaded while the indicator was running.
As far as I can determine, you cannot access the market depth data that the indicator has left on the chart, because you cannot call the indicator as though it were a function that can return a value. If you call the function and specify a previous bar, e.g. DOM[2], you just get the current bar's DOM data. MC does not have a way of connecting the function to the indicator, as they could have different names.

Hopefully someone knows a way around this. Being able to call an indicator as a function would solve the problem.

You can, of course, Export the DOM data from the indicator, but that doesn't give us the functionality we need.

MAZINGUER
Posts: 75
Joined: 06 Jan 2017
Has thanked: 9 times
Been thanked: 25 times

Re: Historical function data

Postby MAZINGUER » 17 May 2018

Gregorian,
If I'm not wrong, you can refer to the market depth data loaded while the chart and the indicator have been executed in real time. In addition, these data can be saved. But ONLY Level 1 data
The Level 2 data do not think you can refer to them historically, nor optimize any strategy based on them.
The only way to optimize both Level 1 and Level 2 data is perhaps using the market DAta Replay
Note that there are words for Level 1 data and different words for Level 2 data.
Maybe through some complex programming I could do it (saving the Level 2 data in some excel or something similar and then be able to work with them)
The truth is that this topic is very interesting but I have it a bit left out because at the moment I am with forex, which is a market for which there is no market depth data


Return to “MultiCharts”