Forum

Candle Lowest & Highest Price

Hi, I am trying to get the lowest and highest price of the candle but am getting it wrong it seems please assist if you can? //Price is higher than lowest price D1: if ( iLowest (pairs[i], toTF(PCS_TimeFrame1), 0 ) < symbols[i].ask) //Price is lower than highest price D1: else if ( iHighest

Close all open orders when first order TP hit

Hi, I need some help please... I would like my EA to close all open orders when the first open order TP is hit - for magic number, symbol... The code below is closing all trades when any SL / TP hit. bool checked ; if (ATR_TP1_CloseTrades) { for ( int i = OrdersTotal() - 1 ; i >= 0 ;