How to place a order between two price of same symbol with specific range ?
- Perhaps you should read the manual. Trade Functions / OrderSend - Reference on algorithmic/automated trading language for MetaTrader 5
- You haven't stated a problem, you stated a want.
Show us your attempt (using the CODE button)
and
state the nature of your problem.
No free help
urgent help.Or pay someone. Top of every page is the link Freelance.
Hiring to write script - General - MQL5 programming forum
- Perhaps you should read the manual. Trade Functions / OrderSend - Reference on algorithmic/automated trading language for MetaTrader 5
- You haven't stated a problem, you stated a want. Show us your attempt (using the CODE button) and state the nature of your problem.
No free help
urgent help.Or pay someone. Top of every page is the link Freelance.
Hiring to write script - General - MQL5 programming forum
I have existed order from price 1470 to 1560
1560
1540
1530
1510
1490
1470
i want to place buy stop orders at 1550, 1520,1500,1480 .
in sort wherever EA finds gap of 10 pip between existed stop or limit orders
not open orders at same price
i tried below code but it opens unlimited orders at same price
{
double min=0,max=0,profit;
int type;
double op, lastlot,ticket;
for(int trade = OrdersTotal()-1; trade >= 0; trade--)
{
if(!OrderSelect(trade,SELECT_BY_POS,MODE_TRADES))
continue;
if(OrderSymbol()!=Symbol() || OrderMagicNumber()!=magic1 || OrderType()!=0)
continue;
if(OrderOpenPrice() > max)
{
max = OrderOpenPrice();
a=OrderOpenPrice()+1;
// b=a+1;
}
if(OrderOpenPrice() < min || min == 0)
{
min = OrderOpenPrice();
type=OrderType();
lastlot=OrderLots();
ticket=OrderTicket();
profit=OrderProfit();
}
}
if (a!=b)
{
ticket=OrderSend(Symbol(),4,start_lot,max,3,0,0,"",magic1,0,Blue);
}
}
- www.metatrader5.com
ex: I have XAUUSD 4 open order
1550
1530
1510
1490
i want to place market order between 1530 and 1510 at 1520
suggest me code for it