Forum

MT5 close all order immadiately?

I want script that close all pending orders When OnTick accures. I tested this but not happens: #include <Trade/Trade.mqh> void OnTick () { int total= OrdersTotal (); for ( int i= 0 ;i<total;i++) { ulong ticket= OrderGetTicket (i); if (ticket== 0 ) continue ;

How Get all pending orders price value ?

Hi I want to get all orders prices (double values) into array or string... I searched all topic 2 days! but not found any way in MQ5. please help