problem buy/sell

 

help me pls.....

i try to build EA... but one problem...how  order buy/sell in specific price...

exampel....

buy GU x.xx10....if find price with 2 digit behind is 10... and then buy

sell GU x.xx25....if find price with 2 digit behind is 25... and then sell

thks.....

 

Hi kupret,

I guess you can apply some math there.

For instance,

int a = Ask*100;

double b = Ask*100;

if ( a == b-0.1 ) { then you know that last 2 Ask digits were 10 and do whatever you want }

Of course there are many ways to do this, you just have to work around them, like using MathRound

Cheers

 

To get the last two digits of Bid price:

x = MathMod(Bid/Point, 100);

 
thks forexfordinner..... thks phy.... problem solve :)