&& OrderSelect(ticketBuy,0,MODE_TRADES==true)
Where does the value for ticketBuy come from? In the above you are using it to locate a position in the trades list
bool result= OrderClose(ticketBuy,lot,Bid,3,clrAqua);
here you are using it as the actual Ticket#
It can't be both.
Don't use integers when you can use an enum, use SELECT_BY_POS or SELECT_BY_TICKET.Keith Watford:
Where does the value for ticketBuy come from? In the above you are using it to locate a position in the trades list
here you are using it as the actual Ticket#
It can't be both.
Don't use integers when you can use an enum, use SELECT_BY_POS or SELECT_BY_TICKET. I'amthank you for replying Keith.
I'm getting ticketbuy from the OrderSend function.
you mean I should use ticketbuy either in OrderSelect or in OrderClose ?
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
Can any one explain?
the OrderSelect, OrderType and OrderClose functions am I using correctly ?
I want to close a trade when the new high comes.