Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 1906
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
So, is it possible to specify in the code that the EA opens a position (or reflects it) not on the chart where it is set, but on the same symbol, but on a different chart? Or it is not possible in principle?
Any request for account or trade status goes to the grid, where there are no conditions and no timeframes. The answer to your question: This is not possible.
So, is it possible to specify in the code that the EA opens a position (or reflects it) not on the chart where it is set, but on the same symbol, but on a different chart? Or it is not possible in principle?
You want EA #2 to see all positions opened by EA #1, right?
Well, that's easy.
You want EA #2 (let's say) to see all the positions opened by EA #1, right?
Well, that's easy.
He wants the monitor to not see anywhere that he interferes with EA trading.
Alexey Viktorov #:
Thanks for the previous reply, but now another problem. When testing for over a year the memory runs out. The tester writes "Channel_1" : out of memory. Also, "Channel_1" : not initialized. These messages appear after testing for a year or more on 3 computers. The indicator (Channel_1) is connected via a resource. Did not do any dynamic memory allocation via new. The whole problem appeared after the changes described in the previous post. I started to loop through the connected indicator and each time I change intu parameter (period) in it.
Thanks for the previous reply, but now another problem. When testing for over a year the memory runs out. The tester writes "Channel_1" : out of memory. Also, "Channel_1" : not initialized. These messages appear after testing for a year or more on 3 computers. The indicator (Channel_1) is connected via a resource. Did not do any dynamic memory allocation via new. The whole problem appeared after the changes described in the previous post. I started to loop through the indicator and every time I change its intu parameter (period).
Maybe that's the problem? Try periodically deleting the resource
But then you have to create it dynamically.
That is, first delete the resource, then re-create it. The only problem is that I don't know how it will work. Or if it will work at all. We'll have to try...
You want EA #2 (let's say) to see all the positions opened by EA #1, right?
Well, that's easy.
Yes, exactly: that EA #2, would see all positions opened by EA #1. Only if it were easy for me, I would not ask for help.
So far, I see the following solution: to write an indicator that creates an object "point" with coordinates of position opening by EA #1 and place it on a chart with EA #2 installed.
If my logic is correct, I still need help writing this indicator.
Good afternoon. I have added everything to the script as suggested - code of the script to translate the graphs to d1 and the midterm template below.
The terminal window with open charts in the screenshot below.
I have 7 open charts in the screenshot and all of them have the scalping pattern as well as AUD/USD. When I drag and drop the script D1_AND_SHABLON.mq4 nothing happens - what is the reason for this error? O_o
Good afternoon. I have added everything to the script as suggested - code of the script to transfer the graphs to d1 and the midterm template below.
The terminal window with open charts in the screenshot below.
I have 7 open charts in the screenshot and all of them have the scalping pattern as well as AUD/USD. When I drag and drop the script D1_AND_SHABLON.mq4 nothing happens - what is the reason for this error? O_o
The problem is that there are too many Expert Advisors and everyone has a different solution. Even if it is correct, it differs from others. But it is often completely wrong.
Sasha advised to put the template name without .tpl, but in my tip it is
This is the forum for trading, automated trading systems and strategy testing.
Any questions from newbies on MQL4 and MQL5, tips and discussion on algorithms and codes
Alexey Viktorov, 2022.02.17 08:29
You have only one more line in your code. Or even replace two lines with one.
Yes, exactly: that EA #2, would see all open positions by EA #1. Only if it were easy for me, I would not ask for help.
So far, I see the following solution: write an indicator that would create a "point" object with coordinates of position opening by EA #1 and place it on a chart with EA #2 installed.
If my logic is correct, I still need help writing this indicator.
Yes, exactly: that EA #2, would see all open positions by EA #1. Only if it were easy for me, I would not ask for help.
So far, I see the following solution: write an indicator that would create a "point" object with coordinates of position opening by EA #1 and place it on a chart with EA #2 installed.
If my logic is correct, then I still need help in writing this indicator.
It is not quite clear whether you need to see the position opened by EA #1
or EA #2?
Here, below is the code of EA that sees open positions opened by EA #1,
You just need to put it in EA#1's magic properties.
And it displays the coordinates of the last open position in the somment.