- select new order.
- Trailing Stop - OrderTakeProfit()
- IF SOMEONE COULD PLEASE HELP, THEY CAN USE THIS PROFITABLE EA
can i choose new order from function OrderSelect()? i think orderselect select by ticket, i want take value of order ticket automatically from my hitory. can i do it??
yes.
either select by ticket or select by magic number.
preferable, select by magic number, for many reasons.
yes.
either select by ticket or select by magic number.
preferable, select by magic number, for many reasons.
i want select new order, when it close, from history can i fetch taht new order? can you explain what must i write in metaeditor?
i want select new order, when it close, from history can i fetch taht new order? can you explain what must i write in metaeditor?
OrderSelect(i,SELECT_BY_POS,MODE_HISTORY)==false
how i can edit this function to select new order was i closed before??
OrderSelect(i,SELECT_BY_POS,MODE_HISTORY)==false
how i can edit this function to select new order was i closed before??
for(i=0;i<OrderHistoryTotal()-1;i++)
{
If(OrderSelect(i,SELECT_BY_POS,MODE_HISTORY) && OrderTicket()==ticket)
{
// do stuff here
}
}
Or
for(i=0;i<OrderHistoryTotal()-1;i++)
{
If(OrderSelect(i,SELECT_BY_POS,MODE_HISTORY) && OrderMagicNumber()==magic)
{
// do stuff here
}
}
I’m replying from mobile phone.
for(i=0;i<OrderHistoryTotal()-1;i++)
{
If(OrderSelect(i,SELECT_BY_POS,MODE_HISTORY) && OrderTicket()==ticket)
{
// do stuff here
}
}
Or
for(i=0;i<OrderHistoryTotal()-1;i++)
{
If(OrderSelect(i,SELECT_BY_POS,MODE_HISTORY) && OrderMagicNumber()==magic)
{
// do stuff here
}
}
what the value of variable ticket or variable magic ?
I’m replying from mobile phone.
for(i=0;i<OrderHistoryTotal()-1;i++)
{
If(OrderSelect(i,SELECT_BY_POS,MODE_HISTORY) && OrderTicket()==ticket)
{
// do stuff here
}
}
Or
for(i=0;i<OrderHistoryTotal()-1;i++)
{
If(OrderSelect(i,SELECT_BY_POS,MODE_HISTORY) && OrderMagicNumber()==magic)
{
// do stuff here
}
}
wow. i can fix it. thank you for your time.
- When you post code please use the SRC button! Please edit your post.
General rules and best pratices of the Forum. - General - MQL5 programming forum -
Using OrdersTotal directly and/or no Magic number filtering on your
OrderSelect loop means your code is incompatible with every EA (including itself on other charts and manual
trading.)
Symbol Doesn't equal Ordersymbol when another currency is added to another seperate chart . - MQL4 and MetaTrader 4 - MQL4 programming forum
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use