
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Hi,
I need some help with this code, After I placed BuyStop order the following is executed
void OnTrade()
{
int o_total = OrdersTotal();
for (int j=0; j<o_total; j++)
if (myorder.Select(OrderGetTicket(j)))
if (myorder.Type() == ORDER_TYPE_BUY_STOP)
signal_time=myorder.TimeSetup();
Print (TimeToString(signal_time,TIME_DATE|TIME_MINUTES));
}
signal_time is defined as global datetime, print gives WRONG_VALUE (which is assign on Init());
Works if I skip part
if (myorder.Type() ==ORDER_TYPE_BUY_STOP)
If I try to print value of myorder.Type() is 0, where ORDER_TYPE_BUY_STOP is 4;
Is't this has something to do with time, when I send query (onTrade) ?