Forum

"For" cycle never ending and making the same action multiple times mql4

anyone help me? here's the code: { if ( OrdersTotal () == 0 && iRSIm51 > 70 && iRSIh41 > iRSIh42){ int ticket = OrderSend ( Symbol () , OP_SELL , 0.1 , Bid , 0 ,Bid + 100 * Point , Bid - 220 * Point , "venda" , 0 , TimeCurrent ()+ 3600 * 24 , clrRed );} } for ( int i = 0 ; i <

How to use OrderTotal value as a variable

Hi everyone . I'm quite new to coding and my ea is having sucessive losses in a single minute and I'd like to make him wait until it's a better time to go on. I have had a lot of trouble using the OrderTotal to do other things because once I use it outside the order select parenthesis, I get the