Watch how to download trading robots for free
Interesting script?
So post a link to it -
let others appraise it
You liked the script? Try it in the MetaTrader 5 terminal
Scripts

CLOSE ALL BY ORDERTYPE - script for MetaTrader 4

TAT DAT NGUYEN
Published by:
Tat Dat Nguyen
Views:
2301
Rating:
votes: 16
Published:
2021.10.18 15:33
   for(int i=OrdersTotal()-1; i>=0; i--)
   {  if(!OrderSelect(i,SELECT_BY_POS,MODE_TRADES)) continue;
      if(kcmd!=6 && OrderType() != kcmd) continue;
      if(OrderSymbol() != _Symbol) continue;
      if(!OrderClose(OrderTicket(),OrderLots(),OrderOpenPrice(),10,clrNONE))
         Print("Ticket #",OrderTicket()," close error #",GetLastError());
   }
    Chart Format Chart Format

    Định dạng chart

    History to CSV History to CSV

    Tải toàn bộ lịch sử ra file .csv

    FX Margin Calc FX Margin Calc

    FX Margin Request Per Lot Calculator Tính yêu cầu ký quỹ cho 1 lot

    TMA Moving Average TMA Moving Average

    Thuật toán đường trung bình trung tâm lượng giác