Questions from Beginners MQL5 MT5 MetaTrader 5 - page 1440

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
That's what many people start learning a programming language for. And so it turns out that in order for you to be able to test your illusory idea, someone will sit down to write. Of course, you can find such an enthusiast who can write for the sake of practice writing, out of boredom or for some other reason... But if you agree and get a strategy through LS, realising that it will not work refuse to write, then you will have a suspicion that you have been cheated, have a profitable strategy and into the bushes. And who needs such an attitude? If you publish a strategy and someone is interested, you will be lucky. And so, for your money any whim....
You are an interesting person.
So you have enough enthusiasm for such an indicator) https://c.mql5.com/1/237/vgif-ru-19978.gif.
And you don't want to insert two lines of code into RSI for the sake of writing practice, out of boredom or for some other reasons...
You're an interesting man.
So you have enough enthusiasm for such an indicator) https://c.mql5.com/1/237/vgif-ru-19978.gif
And you don't want to insert two lines of code into RSI for the sake of writing practice, out of boredom or for some other reasons...
Well, if you know that it is two lines, you should know what lines they are and where to insert them.
Good morning and good mood everyone!
Yesterday there was a confusion with my Expert Advisor. Until yesterday it had been testing for almost a month without any problems, but closer to the evening suddenly the calculation of risk depending on free margin stopped working properly and the EA started opening positions with the maximum possible lot. I decided to write a check function to allow trading under certain conditions to exclude such "gifts". I wrote it and added it to the EA code. I don't know whether this function helped or something else happened while writing it, but the work of the Expert Advisor has normalised.
Request to the respected community!
Please look at the code and advise what else should be added to the function to exclude such "gifts" for trading on a real account?
Regards, Vladimir.
I can't understand how and what it needs, it takes and reads a file from Tester\Agent... folder in TERMINAL_DATA_PATH, but I need to read it in TERMINAL_PATH and I can't use absolute path.
I can't understand how and what it needs, it takes and reads a file from Tester\Agent... folder in TERMINAL_DATA_PATH, but I need to read it in TERMINAL_PATH and I can't use absolute path.
If you need to work with files during testing, it is more convenient to use a common folder of all terminals and agents for this purpose. To do this, it is enough to add the FILE_COMMON flag to file opening operations.
You can get to this folder to put the necessary files in it from the MetaEditor main menu: File → Open common data folder
If it is necessary to work with files during testing, it is more convenient to use a common folder of all terminals and agents for this purpose. For this purpose it is enough to add FILE_COMMON flag in file opening operations.
You can get to this folder to put the necessary files in it from the MetaEditor main menu: File → Open common data folder
Thank you!)
You're an interesting man.
So you have enough enthusiasm for such an indicator) https://c.mql5.com/1/237/vgif-ru-19978.gif
And you don't want to insert two lines of code into RSI for the sake of writing practice, out of boredom or for some other reasons...
This is not my creation. Do you remember the Monna Lisa in the film "Office Romance"?
As for the two lines, I've explained it to you.
Forum on trading, automated trading systems and testing trading strategies.
Questions from MQL5 MT5 MetaTrader 5 beginners
Alexey Viktorov, 2023.01.30 07:17 AM
This is the reason why many people start learning a programming language. And so it turns out that so you can test your illusory idea someone will sit down to write. Of course you can find such an enthusiast who can write for the sake of practice writing, out of boredom or for some other reason ... But if you agree and get through LS strategy, realising that it will not work to refuse to write, then you will have a suspicion that you were cheated, have a profitable strategy and into the bushes. And who needs such an attitude? If you publish a strategy and someone is interested, you will be lucky. But for your money, any whim...
Request to the respected community!
Please look at the code and advise what else should be added to the function to exclude such "gifts" for trading on a real account?
Regards, Vladimir.
Vladimir, how did you
converted into bool type
ACCOUNT_MARGIN_FREE
The amount of free funds on the account in the deposit currency available for opening a position.
double
This is what my eye stumbled on. I don't even want to look at the rest...
Vladimir, how did you convert this to a bool type
ACCOUNT_MARGIN_FREE
Amount of free funds on the account in the deposit currency available for opening a position
double
This is what I stumbled on. I don't even want to look at the rest....
Hi Alexey, I was thinking like this - if free funds on the account in the deposit currency available for opening a position are enough, then it is true. Now I realise that this value is for calculations only. Thank you for the hint.
Regards, Vladimir.
Good morning and good mood!
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.