bool tradeOn= false ; for ( int pos= 0 ; pos< OrdersTotal ();pos++){ if (! OrderSelect (pos, SELECT_BY_POS)) continue ; if (OrderType()< 2 ) {tradeOn= true ; break ;} else continue ; } if (tradeOn){ for ( int pos= 0 ; pos< OrdersTotal ();pos++){ if (! OrderSelect
I want to use auto lot sizing like this : balance 1000 - 1999 lot 0.01 balance 2000 - 2999 lot 0.02 balance 3000 - 3999 lot 0.03 I am already used " % of balance => lot 100% " and it gives me lot 0.01 on balance 1000 .. but when the balance exceed 1500 the lot becomes 0.02 and when balance becomes
//---------------------------------------------- Input parameters ---! input double StartLotSize = 0.01 ; // The starting lot size input double StartBalance = 100.0 ; // The starting balance //---------------------------------------------- Money management ---! double
Why do I have different results testing my EA in different MT4 platforms
bool tradeOn= false ; for ( int pos= 0 ; pos< OrdersTotal ();pos++){ if (! OrderSelect (pos, SELECT_BY_POS)) continue ; if (OrderType()< 2 ) {tradeOn= true ; break ;} else continue ; }
if (OrderModify(Ticket,Open_Price,New_SL,TP_Order, 0 ));
// delete pending order if (OrderDelete(ticket)) return ( 1 ); }
Dear all, I am creating my system to open two pending orders - BuyStop and SellStop Next, I want it to Close or Delete one of the Stop order when Buy or Sell is executed. Example: Case 1: BuyStop and SellStop are Placed BuyStop is executed - Buy. Then, SellStop should be closed. Case 2: BuyStop and
Which Scripts will be the least busy EA
while (!IsTradeAllowed()) Sleep ( 500 );