Close a position in mql5 by type


Hello all,

Am new to EA coding, i have 2 questions :

1- what is GetTicketNumber of a position ? is it an INTEGER that starts from 0 or 1 ?

2- How to close all positions By Type ? Only close buy or sell only positions.

Thanks for your help all.

How to start with MQL5
How to start with MQL5
  • 2021.06.04
This thread discusses MQL5 code examples. There will be examples of how to get data from indicators, how to program advisors...
Thanks for your reply i'll check the article