Errors, bugs, questions - page 291

 
Interesting:

By the way, the developers should add to the standard library a functionality for CPositionInfo, which automatically fills the array of deals for the selected position at least (there is no such thing yet).

The C...Info classes were "tuned" to access the information as a "wrapper" for MQL functions.

There are plans to develop them in the future to be used as data storages.

 
Valmars:

But there is the HistorySelectByPosition() function , which does the same thing, all we need is to know the position identifier. And it allows to get the history for both existing and already closed positions. What will your proposed method return? An array of deals on the existing position, or the entire history of the symbol? And if there is no position at the moment, what will it return?


Of course, many things can be solved at a "low level", but I want to have a solution in a standard library.

And the function will return the number of deals that formed the position (which participated in the process), and at the same time it will fill the array of tickets for these very deals.

At any error, it will return 0. I haven't seen such a thing in the standard library (maybe I didn't look hard enough).

Of course, this is just a suggestion, because no one will prohibit to write the descendant of the standard class and do there anything and how you want.

uncleVic:

In the future we are planning to develop them to be used as data storages.

That's nice, in a way.
 
Valmars:
The time of position opening is always one, and there can be many changes of volume (and/or direction) of position during its existence, and what do you want to get the whole array of time of position volume change with standard library method? The volume change is always a result of a trade, so you need to analyze the history of trades for a given position, and the time of a trade is reflected there. If you need the time of the last position change, you should find the last deal of the position in the history, and look what is equal to DEAL_TIME for it.
I meant the time of last change and get it with the help of standard library method.
 

Gentlemen professionals, help me understand something

I have found a static int Recount[] in Code Base 9 on Multik (multi-currency EA), but further this array takes

tru or fals ---- is it a mistake or not and one more thing: when this multi-currency EA is attached to the EUR chart, the quotes of other currencies I can do whatever I want with them.

Thanks in advance Vladimir

 
fvdtrejder:

Gentlemen professionals, help me understand something

In the Code Base 9 page Multik (multicurrency EA) in the program it's written static int Recount[] and then this array takes

tru or fals ---- is it a mistake or not and another question is if the multi-currency EA is attached to the EUR chart and the quotes of other currencies I can do whatever I want with them.

Thanks in advance Vladimir

Probably just boolean values converted to 1 or 0. I personally do not see a big problem (probably the author was comfortable with it).

All symbols and their parameters in this EA are hard coded.

With every tick of the "work chart" symbol, the Expert Advisor receives signals for all 12 symbols and tries to trade in accordance with these signals.

From a particular symbol, as I understand it, only the frequency of ticks depends, i.e. the triggering frequency of OnTick().

 
Interesting:

Most likely, boolean values are just converted to 1 or 0. I personally do not see a big problem (probably, it was convenient for the author).

All symbols and their parameters in this EA are hardcoded.

With every tick of the "work chart" symbol, the Expert Advisor receives signals for all 12 symbols and tries to trade in accordance with these signals.

As far as I understand, only tick frequency depends on a particular symbol, i.e. frequency of OnTick() triggering.

I didn't find in the program where Boolean expressions are converted to 1 or 0, or maybe I misunderstood something.

And thank you for the rest

 
fvdtrejder:

When this multicurrency EA is attached to a euro chart for example, the quotes of other currencies continue to flow into this program and I can do anything with them, what does physically attaching the EA to a specific instrument mean?

"Physically" attaching an EA to a specific chart simply starts the EA. As far as I understand it, the need to attach an EA trading on different instruments to a single chart should be seen as an atavism, conceptually supported at this stage of platform development.

 
fvdtrejder:

what is gained by physically attaching an EA to a particular instrument

If we are talking specifically about multicurrency EAs, some features are described here.
 
Yedelkin:

"Physically attaching an EA to a specific chart simply causes that EA to run. As far as I understand it, the need to attach an EA that trades on different instruments to a single chart should be seen as an atavism, conceptually supported at this stage of the platform's development.

Can I write Recount[Number] =false after describing the array static int Recount [] in the program
 
fvdtrejder:

I have not found in the program where boolean expressions are converted to 1 or 0, or am I misunderstanding something?

And thank you for the rest.

The idea is to convert automatically, true is 1, false is 0.