Questions from Beginners MQL5 MT5 MetaTrader 5 - page 1446
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 will make a minimal test Expert Advisor that will update the record in the database every second. Run it on 10 pairs and everything will be clear. I'll post it here.
Interesting. I'll be waiting...
Interesting. I'll be waiting...
Here's an expert. It creates a base (if it doesn't already exist) and writes the current time into it once a second.
There is no Print() in the code.
I ran it on 10 pairs and it got errors:
To get an error you have to close and restart MT5 then all EAs start working synchronously.
It would be good:
1. To understand how to get rid of this error.
2. To invent a template mechanism that would queue in case the base is unavailable.
I solved point 2 by adding Sleep() with random time, but it looks like a crutch.
UPDATE: Ireuploaded the file, the first one had an error.
Here is an expert. It creates a base (if it doesn't already exist) and writes the current time into it once a second.
There is no Print() in the code.
I ran it on 10 pairs, errors occurred:
In order to get an error you should close and restart MT5 then all the Expert Advisors start working synchronously.
It would be good:
1. To understand how to get rid of this error.
2. To invent a template mechanism that would queue in case of unavailability of the base.
I solved point 2 by adding Sleep() with random time, but it looks like a crutch.
UPDATE: Ireuploaded the file, the first one had an error.
Alas, my knowledge is not enough. Only enough to realise that an error is being printed
DatabaseExecute(db, sql);
There is no possibility to check availability before creating a query.
The database opens, but it is not possible to create a query.
terminal log
terminal log
I guessed I switched on the logs, can't calculate the lot. I don't understand why it doesn't want to calculate on real?
I guessed I switched on the logs, it can't calculate the lot. I don't understand why it doesn't want to calculate on real?
There are no logs, so there can be many times more guesses.
As an option, when trading crosses, if in the market overview is not selected pair with the currency of the deposit, will not trade.
For example, we trade EURJPY, deposit currency USD, in the market overview must be present EURUSD and USDJPY.
There are no logs, so there could be many times more guesses.
As an option, when trading crosses, if the pair with the deposit currency is not selected in the market overview, will not trade.
For example, we trade EURJPY, deposit currency USD, in the market overview must be present EURUSD and USDJPY.
Account in USD pro cent, trading XAUUSD
Hi all. I can't draw one arrow on the first bar using buffers in MQL5.
In MQL4, I do the following:
Declare a global variable double XX[];
write in init:
SetIndexBuffer(0,XX);
SetIndexStyle(0,DRAW_ARROW);
SetIndexArrow(0,108);
In Oncalculate I write:
XX[1]=High[1]; I get a drawn arrow over candlestick 1. and that's it
I do the same in MQL5:
Declare a global variable double XX[];
write in init:
SetIndexBuffer(0,XX,INDICATOR_DATA);
PlotIndexSetInteger(0,PLOT_ARROW,108);
In Oncalculate I write:
XX[1]=high[1]; - it does not draw
XX[1]=iHigh(Symbol(),PERIOD_CURRENT,1); - also does not draw.
Of course, even in the header it is specified:
#property indicator_buffers 1
#property indicator_plots 1
#property indicator_type1 DRAW_ARROW
#property indicator_color1 clrGreen
#property indicator_width1 1
What am I doing wrong, please tell me !!!!
XX[1]=high[1]; - not drawing
What am I doing wrong, please tell me !!!!
How about this:
or like this: