Hello, could you please tell me if it is possible for the Expert Advisor to add an object such as a button or toggle switch to the chart, and if so, how?
Help for objects: OBJ_BUTTON orOBJ_BITMAP. There are examples there.
When checking the indicator step by step, I found a bounce in the subroutine behind the if {} and in which there is no W. Here is a simplified code to clarify the point:
//--- return value of prev_calculated for next call
return(rates_total);
}
Result (arlet):
2016.05.30 00:45:14.064 1 (EURUSD,H1) 11
2016.05.30 01:10:35.972 1 (EURUSD,H1) 10
........... etc. to 1.
2016.05.30 00:45:14.064 1 (EURUSD,H1) 1
Rule: If the expression in brackets is true, then operator1 is executed.
In code: operator1 is executed ALWAYS.
I think if() should work only once when the bracketed condition is true. But it actually occurs at each check, so all expressions in {} are executed at each step and chew machine time.
Questions: WHY did the CO variable grow from 0 to 11 during the loop? Why is Alert triggered at every step?
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
Hello, could you please tell me if it is possible for the Expert Advisor to add an object such as a button or toggle switch to the chart, and if so, how?
edutak:
Тестер пишет, непрерывный проигрыш 3, а я вручную насчитал 5, потом еше больше. Из-за чего такое может быть?
without at least a report from the tester, you can't understand
without at least a report from the tester, you can't understand
lot 0.1
Could the tester be lying?
the report is StrategyTester report html
Can't attach...
Archive it.
When checking the indicator step by step, I found a bounce in the subroutine behind the if {} and in which there is no W. Here is a simplified code to clarify the point:
//--- input parameters
input int w=10;
//---
{
int i;
//---
int co=0;
for(i=0;i<=w;i++)if(w==10){co++; Alert(co);}
//--- return value of prev_calculated for next call
return(rates_total);
}
Result (arlet):
2016.05.30 00:45:14.064 1 (EURUSD,H1) 11
2016.05.30 01:10:35.972 1 (EURUSD,H1) 10
........... etc. to 1.
2016.05.30 00:45:14.064 1 (EURUSD,H1) 1
Rule: If the expression in brackets is true, then operator1 is executed.
In code: operator1 is executed ALWAYS.
I think if() should work only once when the bracketed condition is true. But it actually occurs at each check, so all expressions in {} are executed at each step and chew machine time.
Questions: WHY did the CO variable grow from 0 to 11 during the loop? Why is Alert triggered at every step?