For example, search for max=0 by closing (conditional, the main thing is to understand the reason why the algorithm does not work).
The point is, max=0, why?
OOPS! Found the error!
Instead of
for (i=24;i<1;i-- )
need
for (i=0;i<25;i++ )
P.s. Who needs - good example of how to look for extrema without "tails". ;)
double max; int k=0; //+------------------------------------------------------------------+ //| expert initialization function | //+------------------------------------------------------------------+ int init() { //----
//---- return(0); } //+------------------------------------------------------------------+ //| expert deinitialization function | //+------------------------------------------------------------------+ int deinit() { //----
//---- return(0); } //+------------------------------------------------------------------+ //| expert start function | //+------------------------------------------------------------------+ int start() { int i,j; //----
if (Hour()>5 && (k==0) ) { for (i=24;i<1;i-- ) <---- тут исправить.. { if ( TimeHour(iTime(NULL,60,i))==23)
I cannot find the script, I remember someone asking me how to add OBJ_ARROW or OBJ_TREND and then use SLEEP(.....) to remove the objects, I need a loop which adds objects from specific levels and removes them after a certain time
search engine gives OBJ_ARROW & OBJ_TREND & SLEEP(50) - not found or frequent requests make it go away
griha: I can't understand the difference between balance and equity. How are they different?
Balance is the amount you would have in your account if all open trades were to close at zero, while equity is the amount you would have in your account if all open trades were to close at the current price. Naturally, when there are no open trades, balance=equity.
griha: I can't understand the difference between balance and equity. How are they different?
Understand one thing - do not pay attention to balance, but equity is your money. Balance can be in the millions, but if equity tends to zero, expect Margin Call, followed by Stop Out.
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.
For example, search for max=0 by closing (conditional, the main thing is to understand the reason why the algorithm does not work).
The point is, max=0, why?
OOPS! Found the error!
Instead of
for (i=24;i<1;i-- )
need
for (i=0;i<25;i++ )
P.s. Who needs - good example of how to look for extrema without "tails". ;)
double max;
int k=0;
//+------------------------------------------------------------------+
//| expert initialization function |
//+------------------------------------------------------------------+
int init()
{
//----
//----
return(0);
}
//+------------------------------------------------------------------+
//| expert deinitialization function |
//+------------------------------------------------------------------+
int deinit()
{
//----
//----
return(0);
}
//+------------------------------------------------------------------+
//| expert start function |
//+------------------------------------------------------------------+
int start()
{
int i,j;
//----
if (Hour()>5 && (k==0) )
{
for (i=24;i<1;i-- ) <---- тут исправить..
{
if ( TimeHour(iTime(NULL,60,i))==23)
{
max=Close[iHighest(NULL,0,MODE_CLOSE,24,i)];
k=1;
}
}
}
Comment ("макс дня ",max,"\n","Время по терминалу- ",Hour());
//----
return(0);
}
//+------------------------------------------------------------------+
I cannot find the script, I remember someone asking me how to add OBJ_ARROW or OBJ_TREND and then use SLEEP(.....) to remove the objects, I need a loop which adds objects from specific levels and removes them after a certain time
search engine gives OBJ_ARROW & OBJ_TREND & SLEEP(50) - not found or frequent requests make it go away
I can't understand the difference between balance and equity. How are they different?
I can't understand the difference between balance and equity. How are they different?
Hi all! I would like to draw an OBJECT - a slanted section of a finite length. Draw it from an EA. Does anyone know how?
Hi all! I would like to draw an OBJECT - a slanted section of a finite length. Draw it from an EA. Does anyone know how?
Draw OBJ_TRENDLINE, set OBJPROP_RAY to false
Thank you, I will try it now.
You should draw an OBJECT - a slanted section of a finite length. Draw it from the EA...
There is no such object in MT4.
There is no such object in MT4.