Questions from Beginners MQL5 MT5 MetaTrader 5 - page 1228
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
This is already correct then:
and if it fails to close, look in the log file. There could be a million reasons: redirect, trade ban, no prices, proximity of stop levels...
Thank you. Then it's like this) :
Just added parentheses. So that the newbies don't get confused.
Hello. I often use a string like this in a program to write logs to separate files:
Can you tell me how to shorten this line? In fact, only the output string itself and the name of the variable I output to is changed here.
I tried to use define
but if I call it like this, it won't work anymore:
LOG(Log,"i=",i);
Hello. I often use a string like this in a program to write logs to separate files:
Can you tell me how to shorten this line? In fact, only the output string itself and the name of the variable I output to is changed here.
I tried to use define
but calling it like this won't work anymore:
Do you have an understanding of the preprocessor?
Your
LOG("i=",i);
unfolds inand that's what's fed to the compiler.
It's not even funny. Prescription one: read doku, preferably not local, local already implies some understanding of the terminology.
Try this, it might help: https://metanit.com/cpp/c/3.1.php
It's not even funny. There is only one recipe: smoke the docks, preferably not local ones, because local ones already imply some understanding of the terminology.
Try this, in case it helps: https://metanit.com/cpp/c/3.1.php
What do you mean suddenly? Did it help you? Can you shorten my line with define?
I changed a line of code in my question
LOG("i=",i);
to .
LOG(Log,"i=",i);
Hello. I often use a string like this in a program to write logs to separate files:
Can you tell me how to shorten this line? In fact, only the output string itself and the name of the variable I output to is changed here.
I tried to use define
but if I call it like this it won't work anymore:
I solved my problem by using sheets of functions like this:
Now I call the following in my program
What do you mean all of a sudden? Did it help you? Can you shorten my line using define ?
I changed a line of code in my question
to
Good afternoon, here is the problem: I have an EA that calls a custom indicator to display data, everything works fine in the strategy tester, but in real trading mode when I start the EA, the indicator is not displayed. In the log write custom indicator loaded successfully, it seems to rustle, sends text messages, but on the chart in the list of indicators it also is not. At the same time, if I drag it to the chart it picks up the data and everything is displayed normally. The indicator is located in the Indicators folder, in iCustom(NULL,0, "Indicator name",Count) function. I also tried adding #resource "\\Indicators\\\indicator name.ex5", iCustom(NULL,0,"::Indicators\\\indicator name.ex5",Count) but no difference. What's the reason?
is there a setting to remove the current values of the indicator buffers?
Dear Professionals, could you please advise if it is possible to get the values of RSI for a week timeframe in the code of advisor, but to calculate the values for the week, which does not start on Monday, but for example from Wednesday (that is the week from Wednesday to next Wednesday). As far as I know it cannot be done with iRSI?
So far I can only see a way to write the code for the calculation by myself. Is there a simpler solution or a ready-made solution?