Quote:
Originally Posted by codersguru
 MODE_ASK?? who told you that the constant MODE_ASK means more than the number 10.
Well, MODE_ASK is used with the function MarketInfo to get the ask price of a currency not the one hosting the EA.
double ask =MarketInfo("EURUSD",MODE_ASK);
so, your code should be:
PHP Code:
double ask =MarketInfo("EURUSD",MODE_ASK);
if(ask == 121.10)
{
//do whatever you want.
}
And about setting time to buy you can use:
PHP Code:
if (TimeHour(TimeCurrent()) == 12 && TimeMinute(TimeCurrent()) >= 30)
{
//place a buy order
}
The code above place an order at 12:30 PM
|
Thank You guys for Your kind help.
