Forum

highest price and lowest price only for specified bar range between multiple trades

Hi, I am trying to calculate the highest price and lowest price in the bar range from the bar at which 1st order was opened till the bar at which 'x' order was opened. but i dont know where am i am going wrong. The code seems to be refreshing the highest and lowest prices as new bars open up even

Unable to execute OrderClose() function to all open positions

Hi I am a newbie into mql4 coding and i am trying do my first ever code for mt4. In my strategy I might have hedged positions, which I close all of them when it reaches break-even point. But unfortunately orderclose doesn't execute at all. In the backtesting orders are being opened but orders aren't