Augmentation symbol???

 

What is the augmentation symbol?

I can get an alert if " A>1.999" by using the sign ">".

But what sign should I use if the only thing I want is to get an alert if the value of "A" increases?

 

Save last price in a variable and compare it to the new price.

if (LastPrice < Ask)

{
   Alert(...);
}
 
msbusinessil:

Save last price in a variable and compare it to the new price.


THX, but I'll have to do that at every tick wich is basicaly imposible since there's a tick every seconds or less.

I want to be alerted everytime the value of "Bid" goes Up or Down no matter the price, a bit similar to this program(with a predefined price):

//+------------------------------------------------------------------+

//| expert start function |

//+------------------------------------------------------------------+

int start()

{

double

Level,

Price;

Level=1.28337;

Price=Bid;

//-------------------------------------------------------------------+

if(Price>Level)

{

Alert("en haut");

}

else

{

if(Price<Level)

{

Alert("en bas");

}

}

//-------------------------------------------------------------------+

return(0);

}

//+------------------------------------------------------------------+

I want to be alerted everytime the value of "Bid" goes Up or Down no matter the price.

 

I don't see why it is impossible

double LastPrice;

void init()
{
 LastPrice = Bid; 
}

start ()
{
if (LastPrice < Bid)
   Alert("Price going up");
else if (LastPrice > Bid)
   Alert("Price going down");
LastPrice = Bid;
return(0);
}

 
msbusinessil:

I don't see why it is impossible


I tried it:

double LastPrice;

void init()

{

LastPrice = Bid;

}

//+------------------------------------------------------------------+

start ();

{

if (LastPrice < Bid)

Alert("Price going up");

else if (LastPrice > Bid)

Alert("Price going down");

LastPrice = Bid;

return(0);

}

//+------------------------------------------------------------------+

But it doesn't work, MetaEditor says:

'start' function not defined

'start' expression on global scope not allowed

 
msbusinessil:

I don't see why it is impossible


Don't mind, I changed some things and it works.

Thanks a lot, I love you.

 

But it doesn't work, MetaEditor says:

'start' function not defined

'start' expression on global scope not allowed

Ohh thats because i forgot to write the type of it, if you just added "int" before "start()" it would fix it.

Anyway, good luck!

 

Thx, what does "void" stands for?

Because in the e-book there are several functions with "void" and a name but "void" itself isn't explained.

 
Kerviel:

Thx, what does "void" stands for?

Because in the e-book there are several functions with "void" and a name but "void" itself isn't explained.

It just a function that doesn't have to return anything. A Bool function will return a bool value, int returns integer etc... void just does stuff without passing anything back into the main program.
 
Thanks.
Reason: