Questions from Beginners MQL5 MT5 MetaTrader 5 - page 1441
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
Good morning and good mood, everyone!
Taking into account constructive criticism, I have changed the code of the check function:
CheckMoneyForTrade() and CheckVolumeValue() functions are not posted, as they are freely available and taken from here.
Will this minimum be enough to prevent the problem with the Expert Advisor that I had the day before yesterday?
Regards, Vladimir.
Yes, it seems to be normal, but it is better to check the volume and sufficiency in one function and change the logic on sufficiency. We check whether the margin lot is bigger or smaller, but do not reduce it, if the requested lot is smaller, I also calculate the lot in relation to the available margin, what lot can be set, and compare it with the minimum lot, and if it is smaller, then the trade is definitely over.
Good day everyone! I have an indicator Stochastic RSI. The problem is that it works very slowly. As far as I understand the main "brakes" creates this section because of the large period, which is used to search for the minimum and maximum in the arrays:
Ideally, the solution could be if the indicator would go through all bars in the history during the first run, and would update only the last bar during the next ones. But I don't understand how to do it. Is it possible to do this? If yes, I will be grateful if you share a link or advice on how to do it.
Here is the whole code of the indicator:
I think it's fine, but it's better to put the volume and sufficiency check in one function and change the logic for sufficiency too. We check whether the margin lot is more or less, but do not reduce it, if the requested lot is less, I also calculate the lot relative to the available margin, what lot can be set, and compare it with the minimum lot, and if it is less, then the trade is definitely over.
Thank you, Valery!
Regards, Vladimir.
And here are the first results of the function:
It would be interesting to know what it is? Not in the sense of translation into Russian, as I have already translated it:
but in the sense of how an account can be changed? Can anyone tell me what the hell is going on with my account and what to do in such cases?
Maybe it is somehow connected with the fact that I temporarily switched from real to demo account?
Regards, Vladimir.
Maybe it is somehow connected with the fact that I temporarily switched from real to demo account?
Yes
Thank you, Sergey, now I will know.
Regards, Vladimir.
The Expert Advisor uses an indicator on the specified TF, how can I find out the TF from the indicator handle?
I don't understand, the specified TF should be known. You need to elaborate on the situation.
The Expert Advisor uses an indicator on the specified TF, how can I find out the TF by the indicator handle?
https://www.mql5.com/ru/docs/series/indicatorparameters