[ARCHIVE] Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 3. - page 629

 

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?
 
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.
 

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?

 
ikatsko:

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 property to false
 
alsu:
Draw OBJ_TRENDLINE, set OBJPROP_RAY to false

Thank you, I will try it now.

 
ikatsko:

You should draw an OBJECT - a slanted section of a finite length. Draw it from the EA...


There is no such object in MT4.
 
Roll:

There is no such object in MT4.
Why not? Yes, it does! Following alsu's advice, everything works. Only notOBJ_TRENDLINE butOBJ_TREND
Reason: