
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
I'll probably ignore it for now, but in MQL4 the compiler didn't produce such remarks
The variables are probably OK. Please see my post above...
Question to the developers regarding "user" events and several experts working on the same terminal.
I want to know if I want to make it right or not?
The idea is this
In the course of the play we need to inform the "neighbouring" experts about some of the processes taking place.
...If it is a good idea, it may be finished and formatted as an article. Or add it to the Help section dedicated to user events?
There is an example for function EventChartCustom:
Try it out.
I don't know, if we convert double to int there will definitely be a loss, but if vice versa, there will most likely be an error during normalization, because the second value of the int type function
If you write int to double, everything is handled normally, the compiler just discards the fractional part (according to the rule).
In the reverse situation, however, the compiler starts doubting, and gives a warning about possible problems (as it seems to it).
And since we all know about the fact that when you HAVE to CREATE in a similar situation, we "advise him" to do it. :)
PS
Perhaps developers will turn off REAL warnings in the future, and then, like in MQL4, the compiler will stop shouting about all sorts of trivialities...
Question to the developers regarding "user" events and several experts working on the same terminal.
So I want to ask if I want to make it right or not?
Here is an idea.
In the course of the play we need to inform the "neighbouring" Expert Advisors about some processes that take place.
For example, the following processes should be monitored first:
1. Expert locking;
2. Unloading of the Expert Advisor;
3. Termination of trading operations;
4. Resume trading operations.
Implement
I. Create 4 identifiers of events:
1 - CHARTEVENT_CUSTOM+1//Starting the Expert Advisor
2 - CHARTEVENT_CUSTOM+2//Unloading of the Expert Advisor
3 - CHARTEVENT_CUSTOM+3 //Stop trading operations
4 - CHARTEVENT_CUSTOM+4//Restarting of trading operations
II. Tracking events
When a certain situation happens, the Expert Advisor generates a WIDE message using EventChartCustom.
At the same time,the Expert Advisor writes in sparam a comment (its name and type of the event, or other information) , andlparam its own chart identifier.
The Expert Advisors on other charts (if they can correctly identify the nature of an event) will reply to this specific EA.
PS
If the idea is good, may be it elaborated and arranged as an article. Or add it to help section dedicated to custom events?
There is an example to the EventChartCustom function:
Try it out.
Yes, I've seen this example before (I don't even know how long ago). I wanted to ask if my idea is correct and interesting in terms of implementation.
PS
If it does not fit in the help, then maybe someone will agree to refine it and write an article on this application of events.
It would also be interesting to use custom events in the form of orders from one EA to another (or others). if you sum it all up, it would turn out in my opinion a very interesting article.
Unfortunately, I don't have time to deal with it...
And I don't see the point in using several EAs at once, especially if you play several symbols - you can easily do with one EA, modification, opening and closing can also be done by one EA, the analysis of indicators, too
There is always a sense, especially since not all EAs are multicurrency a priori (based on the experience in MQL4).
So, it's not easy for beginners and many of those who used to be engaged in mechanical trading to organise multicurrency ones properly...
God only knows what will happen if someone wants to execute, say, 2-3 copies of MACD Sample on one account.
Besides situations are different, other Expert Advisors may play a secondary role receiving orders from the first one.
Also, this variant will be acceptable when other EAs ("neighbours") do not trade, but only process data or do certain work.
Also similar things can be implemented in the communication between indices and EAs (with a certain approach).
PS
That's why I suggested to work on this question and if any experienced progamer would be willing to write an article. I would be especially glad if the developers themselves devote some of their time to this issue.
I think there's enough material for more than one article...
............
Unfortunately I don't have the time to do it...
I'm looking at vMA and Close[]. In wotch, it's counting fine. I also tried it like this:
Again I get another error. Maybe there is another way to calculate simple moving average. Or take the handle iMA and CopyBuffer where it should be?
1. In the wotcha, you should specify either the name of Close array (you will see only general information) or a specific value of Close[1], Close[2],..., Close[i].
2. You cannot see how your code fills the mrate array
3. Look at the standard library MovingAverages.mqh - there will be an example of MA calculation
We understand. Too much time is spent commenting on everyone and everything....
There is enough time for commenting too, and for implementing certain ideas.
It's just that I probably won't tackle the issue seriously enough to cover the whole field (and I'm already dealing with some of the applications of the idea, purely for myself).
But in any case I probably won't be writing articles on this subject (for various reasons)...