Questions from Beginners MQL4 MT4 MetaTrader 4 - page 147
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
EA should read from a file an array of data in the form: date integer1 integer2 integer3 integer4, can be from any file type, except bin.
файл скопировал в папку C:\Users\Михаил\AppData\Roaming\MetaQuotes\Tester\1B9501BF48F2354A4685940A72752910\Agent-127.0.0.1-3000\MQL5\Files\qqq.scv
it's deleted from this folder.
here's the code.
can you specify the path to the folder from which the file will not be deleted by the tester? I understood that all files are deleted from this folder during testing, but when the file is created programmatically, it is placed in this folder
EA should read from a file an array of data in the form: date integer1 integer2 integer3 integer4, can be from any file type, except bin.
файл скопировал в папку C:\Users\Михаил\AppData\Roaming\MetaQuotes\Tester\1B9501BF48F2354A4685940A72752910\Agent-127.0.0.1-3000\MQL5\Files\qqq.scv
it's deleted from this folder.
Here's the code.
maybe specify the path to the folder from which the file will not be deleted by the tester? I understood that all files are deleted from this folder when testing, but when creating a file programmatically, it is placed in this folder
Maybe we should use FileCopy with the FILE_COMMON flag. The new test works from scratch, this might be a glitch.
Maybe you should use FileCopy with FILE_COMMON flag. The new test works from scratch, this may be a glitch.
it works if you copy the file to a folder while testing )) now to figure out the separator
I started writing a trading panel in MQL4 and here's the paradox. Everything looks fine, but every time I change TF, lines and text from other indicators are drawn on top of my panel.
Here is what I checked: when changing the TF, parameter OBJPROP_BACK = false. It means that everything is fine on this side.Any ideas on this subject?
P.S. As a matter of fact, I have checked it now and the source code (which I took as a prototype) behaves in the same way. After I have changed TF, it draws normal lines on top of the panel and the lines created by indicators that don't use OOP.
https://www.mql5.com/ru/code/19220
I started writing a trading panel in MQL4 and here's the paradox. Everything looks ok, but every time I change TF, lines and text of other indicators are drawn on top of my panel.
Here is what I have checked: when changing the TF, parameter OBJPROP_BACK = false. So everything is fine on this side.Any ideas on this subject?
P.S. As a matter of fact, I have checked it now, the source code (which I took as a prototype) behaves the same way. After I have changed TF, it draws normal lines on top of the panel and the lines created by indicators that don't use OOP.
https://www.mql5.com/ru/code/19220
When switching timeframe, objects created by other programs are deleted and new ones are created right away. In the panel, objects are not deleted, so they are "old". On the chart, the principle "whoever is last is on top" applies.
You need to delete objects in the panel with DeInit(), and create new ones again
I started writing a trading panel in MQL4 and here's the paradox. Everything looks ok, but every time I change TF, lines and text of other indicators are drawn on top of my panel.
Here is what I have checked: when the TF is changed, parameter OBJPROP_BACK = false. So, everything is fine on this side.Any ideas on this subject?
P.S. As a matter of fact, I have checked it now, the source code (which I took as a prototype) behaves the same way. After I have changed TF, it draws normal lines on top of the panel and the lines created by indicators that don't use OOP.
https://www.mql5.com/ru/code/19220
When switching timeframe, objects created by other programs are deleted and new ones are created right away. In the panel, objects are not deleted, so they are "old". On the chart, the principle "whoever is last is on top" applies.
You need to delete objects in the panel using DeInit(), and create new ones again
it is better to catch creation of a new object in Events and redraw the panel
When you switch times, objects created by other programmes are deleted and new ones are created immediately. In the panel, objects are not deleted, so they are "old". The principle of "The last one on top is the last one on top" applies in the graph.
You need to delete objects in the panel using DeInit(), and create new ones again
Can you tell me a bit more about how to redraw it?
it is better to catch creation of a new object in Events and redraw the panel
ps. that reminds me - you also need to check the name of the created object to make sure it is not "your" object (prefix the name of your objects).
or instead of the name, compare the type of object.
RSI3 = iRSI(_Symbol, _Period, RSIPeriod, PRICE_CLOSE, 1);
RSI4 = iRSI(_Symbol, _Period, RSIPeriod, PRICE_CLOSE, 2);
bool RSItf = RSI3 > 30 && 30 > RSI4;
if(RSItf == true)
{
}
else
{
ordersend(_Symbol, OP_SELL, lot, Bid, Slippage, 0, 0, NULL, Magic, 0, clrRed);
}
bool RSItf = RSI3 > 70 && 70> RSI4;
if(RSItf == true)
{
}
else
{
ordersend(_Symbol, OP_BUY, lot, Ask, Slippage, 0, 0, NULL, Magic, 0, clrBlue);
}
Citizens, tell me if I'm doing it right!!! I need the Expert Advisor to trade when it hasn't entered the 30 or 70 zone, and when it has, it won't trade!!! Is this the right way to do it?
It's something like this, as far as I understand you need