panker: There's code that doesn't work for some reason. Price in m_symbol.Ask() method returns 0.
Look at the library implementation itself. The Ask() method stupidly returns m_tick.ask value. The RefreshRates() method is used to refresh m_tick values.)
If I remember correctly, the OnDeinit() function has 2.5 seconds to execute. Question 1: if not all indicator handles are free during this time, what happens? Question 2: Is there a time limit for OnInit()?
If I remember correctly, the OnDeinit() function needs 2.5 seconds to execute.
Question 1: if all indicator handles are not released during this time, what happens?
Indicator handles are a separate topic in MT5, because their release is controlled not so much by the Expert Advisor itself (it can only send a command that it does not need them and reset the handle value), as by the terminal itself (which makes the final decision to completely delete the entire indicator handle).
I'm writing a multi-currency Expert Advisor where in the input parameters I set the instrument name, such as string Symbol0="EURUSD". If I write the wrong name, the trade does not go. Question: Is there such a function that would compare instrument names with instruments offered by broker?
Do ArrayResize(Buf, rates_total);
Also do this, then at least there will be no error.
And it will draw a straight line=0,014 on Euro M1.
Good afternoon.
There is a code that for some reason doesn't work.
Price in m_symbol.Ask() method returns 0.
Judge the code harshly. I am just learning. Ready to listen to any adequate criticism.
While for the purpose was the fact of opening of a position. Qty not interesting yet(Easy to implement).
Good afternoon.
There is a code that for some reason doesn't work.
Price in m_symbol.Ask() method returns 0.
Judge the code harshly. I am just learning. Ready to listen to any adequate criticism.
While for the purpose was the fact of opening of a position. Qty not interesting yet(Easy to implement).
Maybe you're missing a function, something like SymbolSelect.
In this case, it is a command Name
https://www.mql5.com/ru/docs/standardlibrary/tradeclasses/csymbolinfo/csymbolinfoask - see note
Required
RefreshRates
https://www.mql5.com/ru/docs/standardlibrary/tradeclasses/csymbolinfo/csymbolinforefreshrates
Can someone please give a code example.
How to create a "decimal ScrollBar"?
I used MQL5 class CScroll.https://www.mql5.com/en/docs/standardlibrary/controls/cscroll
If I remember correctly, the OnDeinit() function needs 2.5 seconds to execute.
Question 1: if all indicator handles are not released during this time, what happens?
Indicator handles are a separate topic in MT5, because their release is controlled not so much by the Expert Advisor itself (it can only send a command that it does not need them and reset the handle value), as by the terminal itself (which makes the final decision to completely delete the entire indicator handle).
Question 2: is there a time limit for OnInit()?
Can you tell me what the "profit corridor" should be per year? (в %%)