Questions from Beginners MQL4 MT4 MetaTrader 4 - page 129
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
Please advise how to select a symbol in the tester for testing in
You can't. Only manually select in the settings.
In the tester, of course, you can request data on other symbols, but for this you will have to work hard enough to ensure the synchronization of data (the tester itself will not do it for you, because by default it works with one symbol). Trade on the symbol, different from the selected, in general, can not.
P. S. All this is for MT4. In MT5 situation is different.
NO DECOMPILING ALLOWED!
The Expert Advisor works inOnTimer() EventSetTimer(1). I miss many ticks. TheOnTick() event does not fit me because I analyze several currency pairs at once ... Even Sleep(200) in loop will load system...What to do?
There is also EventSetMillisecondTimer() - it can reduce periodicity of OnTimer() execution.
There is also EventSetMillisecondTimer() - so you can reduce the periodicity of OnTimer().
Thanks, I'll try it...
Good afternoon.
The message "Array out of range" appears in the allocated space during the test. It does not indicate an error during compilation. What is the essence of the error and how can we fix it?
double TD_Close=Close[1];
for (int i=2; i<=Period_bars; i++)
{
if (ABS_High<High[i]) ABS_High=High[i];
}
if (TD_Close>ABS_High)
{
if(OrdersTotal () <= 1 && newCandle != Time[0]) int tiket=OrderSend(Symbol(),OP_BUY,volume,Ask,3,sl,tp,",magic,0);
else newCandle = Time[0];
}
Good afternoon.
The message "Array out of range" appears in the highlighted place during the test. It does not indicate an error during compilation. What is the essence of the error and how can we fix it?
double TD_Close=Close[1];
for (int i=2; i<=Period_bars; i++)
{
if (ABS_High<High[i]) ABS_High=High[i];
}
if (TD_Close>ABS_High)
{
if (OrdersTotal () <= 1 && newCandle != Time[0]) int tiket=OrderSend(Symbol(),OP_BUY,volume,Ask,3,sl,tp,",magic,0);
else newCandle = Time[0];
}
Period_bars should be <= Bars - 1
Hello, friends, help me solve the following problem: I am trying to write a simple Expert Advisor and I have faced the following: if the SL is set to a value different from 0, then trades are not opened at all, as well as the TP, TStop and TrailingStep functions do not work at all.
What should I fix in the code?
Hello, friends, help me solve the following problem: I am trying to write a simple Expert Advisor and was faced with the following: if the SL is set to a value different from 0, then trades are not opened at all, as well as the TP, TStop and TrailingStep do not work at all.
What should I fix in the code?