Questions from Beginners MQL5 MT5 MetaTrader 5 - page 572
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
Hi, I am writing an EA for MT5. I have written an EA in MT5 which I have wanted to use for automatically searching for the necessary patterns and opening positions manually. I.e. there are no trading functions in the EA. My problem is that I cannot install this EA on a chart. There are no indicator calls in the EA. All indicators are written in program. I compiled it and ran it in the strategy tester. There were no problems. I have just put the EA on the chart and allowed it to trade on the screen, in the settings and in the EA window that pops up. Instead of the smiley face on the chart, the Expert Advisor's icon appears on the price chart and a green circle with a white triangle inside it. I tried this procedure several times and got the same results. I changed periods on the price chart, the message from OnDeinit() appears on the monitor, i.e. one candle is processed in the program and work stops.
I took a look at the logbook:
- One of the attempts to install an EA resulted in a Profile change message;
- In all other attempts the EA is loaded without any problems.
I used to work with Profiles: I increased the number of Profiles, set different charts on each Profile. If there was something wrong there, unfortunately, I don't know it. I do not know what must be broken there for the program to give a message about profile change. Although it is possible that the failure is due to some other reason. It is not clear to me.
For the sake of testing, I have created a new EA (template) today and did not write anything in the OnInit(), OnDeinit(const int reason), OnTick() functions and tried to put this EA on the chart and allow trading.
I got the same situation as before.
Please help me to deal with the situation. Thank you !!!!!!
Let's take it one step at a time. Here is the template:
Attach it to the chart and a screenshot of the chart in the studio, as well as the entries from the "Journal" and "Advisors" tabs (if they appear there).
I take it there are no professionals here either. pity......
So reprint the Momentum values from someone else's chart in the tester
Print shows what the buffer draws. There is no information. Can anyone give a sensible answer???? Not some obscure speculation....
Colleagues, can you tell me how to compare candle parameters within a given range?
How to calculate the Maximum or Minimum value, I understand.
Here is the code:
void OnTick()
{
double H = 0;
for ( shift = Search_Period; shift >0; shift--)
{
if (High[shift] > H)
{ H = High[shift]; }
Alert (H);
}
}
But the problem is that it overwrites the value of the variable.
My aim is to find, for example, two or more candlesticks with the same price value of High. In other words, in idea, after each iteration a variable should be created which will store the value, then another one, and so on, until the entire interval is checked. And then they will be able to be compared further.
But I have no idea how to do it ((.
Colleagues, can you tell me how to compare candle parameters within a given range?
How to calculate the Maximum or Minimum value, I understand.
Here is the code:
...............But the problem is that it overwrites the value of the variable.
And my purpose, is to find, for example, two or more candlesticks with the same price value of High. I.e. in idea, after each iteration, a variable should be created which will store the value, then another one, and so on, until the entire interval is checked. And then they will be able to be compared further.
But I have no idea how to do it ((
It looks like this:
how do you put two different EAs into one?
It goes something like this:
I'll try to figure it out. Thank you.