Discussion of article "Implementing a Scalping Market Depth Using the CGraphic Library" - page 4
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
CNode class doesn't stores the type of the basic primitive. CEIChart does by m_obj_type member.
Thanks Vasiliy
In new builds of the terminal (approximately since version 2170) there appeared a problem with the sources of the article ("Writing a scalper's glass").
' Event' - unexpected token, probably type is missing? MBookBtn.mqh 57 12In particular, the main file"MarketBook.mq5" generates critical errors during compilation:
' Event' - function already defined and has different type MBookBtn.mqh 57 12
Could you please tell me what is wrong and how to fix it?P.S. now checked"MarketBook.mq5" from an old article from 2015. It turned out that the same kind of errors occur with that project:
'Show' - unexpected token, probably type is missing? MBookFon.mqh 47 11
'Show' - function already defined and has different type MBookFon.mqh 47 11
In new builds of the terminal (approximately since version 2170) there appeared a problem with the sources of the article ("Writing a scalper's glass").
' Event' - unexpected token, probably type is missing? MBookBtn.mqh 57 12In particular, the main file"MarketBook.mq5" generates critical errors during compilation:
' Event' - function already defined and has different type MBookBtn.mqh 57 12
Could you please tell me what is wrong and how to fix it?The language is developing and the requirements are getting stricter.
Let's look at the file "MBookBtn.mqh", the declaration of the CMBookBtn class - the function Event is declared as void
and now we look at the function itself in the class:
the second error says "'Event' - function already defined and has different type MBookBtn.mqh 57 12" - that is, the function was declared with type void and here it is without specifying the type.
Cure:
- just add void before the function in the class body.
Now compile the ... Indicators\MarketBookArticle\MarketBook.mq5 - there are no errors and run it: the glass works.
The whole code, when I copy and paste it to compile, gives an error when compiling. Does anyone know of a solution?
Lucas, if the error is related to an unexpected token in the CMBookBtn class, the call to the CMBookBtn::Event function must be preceded by void.
That's what we had for the moment.
Hi Vasiliy, thank you for your beautiful article. I'm new in the MQL5 world and I'm facing a challenge in order to try to run your code locally. I believe it is a very silly problem, but I'm not being able to solve it
When I try to compile your code from MarketBook.mq5 I got the error as you can see below.
Can you please help me solve this problem?
Hello.
Can you please tell me if it is possible to fix - remember the time of the found index in the MarketBook.mqh class?
In this method we find the price index on which the maximum volume on the Ask and Bid sides is located.
I also want to know at what terminal time we got this index.
The structure of the stack
Gives us 4 parameters, but there is no time in it.
Who can guide me how to remember the time of the found index?
Hello.
Could you please tell me, is it possible to fix - remember the time of found index in MarketBook.mqh class ?
In this method we find the price index on which the maximum volume on the Ask and Bid side is standing.
I also want to know at what terminal time we got this index.
The structure of the glass
Gives us 4 parameters, but it doesn't have time.
Can anyone point me in the direction of how to remember the time of the found index?
inherit the structure and add an additional field to it to which you will add the tick time when filling it in
Hello.
Could you please tell me, is it possible to fix - remember the time of found index in MarketBook.mqh class ?
In this method we find the price index on which the maximum volume on the Ask and Bid side is standing.
I also want to know at what terminal time we got this index.
The structure of the glass
Gives us 4 parameters, but there is no time in it.
Who can point us in the direction of how to remember the time of the found index
There is no time, because the time of quote arrival in MQL5 cannot be learnt. The maximum that can be done is to remember the time at the moment of arrival of the OnBookEvent event, so remember it. Remembering the time of finding the tops of the stack is also pointless, you need the time of arrival of the price stack, not the time of finding its maximal index.