Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 1964
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
Hi
I am wanting to run multiple accounts on my VPS. Each account with it's own EA running. When I switch accounts, my EA opens on the account i login to. I need it to continue running on the original account. How do I stop this from happening.
Thanking you in advance
Aldo
A MetaQuotes virtual host can only host one trade account at a time, so you will need multiple virtual hosts ...
If using 3rd party VPS, then a single MetaTrader desktop terminal can only run one trade account at a time. So you will need to run multiple terminals (maximum of 32).
Hello everyone.
I started to study MQL4 last week with the intention of making something similar to the Magic Keys device.
Reading the MQL4 manual raised some questions and I was wondering if someone could help me to solve them.
I wonder if it would be possible to create a macro so I can select the rectangle tool and draw in the chart.I would like to
be able to activate/select some of the tools that have no shortcut in the mt4 plataform from a macro pad.
Is that possible? If so, could you tell me what do I need to learn or focuss my attention on?
Thank you.
SaltedPN
Good day everyone,
I am experiencing some problem which I find difficult to explain and hence difficult to find a working solution from the Codebase and forums. I have an indicator which runs well when back testing but when I place it on a live chart, it shows/draws bogus arrows. If I recompile the code while the indicator is placed on a live chart, the bogus arrows become even more. I am thinking that somewhere in the code I have to delete old data from buffers/arrays or set them to empty values, but I don't know how to do that because I don't understand what is causing the bogus arrows.
Please see image below:
The code is below, I have excluded the unnecessary if conditions which in the end only set bool variables to either true or false.
Your assistance in explaining why the bogus arrows appear and showing me how to get rid of them is much appreciated.
Good day everyone,
I am experiencing some problem which I find difficult to explain and hence difficult to find a working solution from the Codebase and forums. I have an indicator which runs well when back testing but when I place it on a live chart, it shows/draws bogus arrows. If I recompile the code while the indicator is placed on a live chart, the bogus arrows become even more. I am thinking that somewhere in the code I have to delete old data from buffers/arrays or set them to empty values, but I don't know how to do that because I don't understand what is causing the bogus arrows.
Please see image below:
The code is below, I have excluded the unnecessary if conditions which in the end only set bool variables to either true or false.
Your assistance in explaining why the bogus arrows appear and showing me how to get rid of them is much appreciated.
I found the solution, and now I see how simple it was. Before the indicator runs, clean all buffers. Since you would like to do this only once, clean the buffers at the instance the indicator is first dropped on the chart, and that would be when prev_calculated is zero. See code below: