Orders Execution
Miscellaneous
0
Views
0
Downloads
0
Favorites
01. ⇴ (Del)
//+-----------------------------------------------+
// Ñêðèïò óáèð¸ò âñå îðäåðà ïî èíñòðóìåíòó |
//+-----------------------------------------------+
void start(){
PlaySound("tick.wav");
bool s = false;
double b = AccountBalance();
int i;
for(;i<OrdersTotal();i++)
{//+-----------------------------------------------------------------------------------------+for
OrderSelect(i,SELECT_BY_POS);
if(OrderSymbol()!= Symbol())continue;
s=true;
int Ticket = OrderTicket();
double Lots = OrderLots();
double Price;
if(OrderType()==1)Price=NormalizeDouble(Ask,Digits);else Price=NormalizeDouble(Bid,Digits);
//+-------------------------------------------------------------------------------------------+
if(OrderType()<2)OrderClose(Ticket,Lots,Price,3);else OrderDelete(Ticket);
//+-------------------------------------------------------------------------------------------+
if(GetLastError()==6){Alert("Íåò ñâÿçè");return;}
if(GetLastError()==132){Alert("Ðûíîê çàêðûò");return;}
RefreshRates();
i--;
}//+----------------------------------------------------------------------------------------+for
if(s)Alert("PROFIT : ",AccountBalance()-b);else Alert("Íåò îðäåðîâ");
PlaySound("ok.wav");
return;}
Comments
Markdown Formatting Guide
# H1
## H2
### H3
**bold text**
*italicized text*
[title](https://www.example.com)

`code`
```
code block
```
> blockquote
- Item 1
- Item 2
1. First item
2. Second item
---