Forum

How to open 1 trade per bar

Hello, I was wondering if there is anyone kind enough to tell me how you would program an expert advisor to open one trade only per bar. What I mean for this is, I have programmed an expert advisor that opens a buy trade when the current MACD is greater than the previous MACD, but opens a trade

How to calculate average high

Hi, I'm just wondering how you would calculate the moving average high for each candle. I'm wondering if this is correct : for(i=0; i <= Bars; i++) { hi = High; } where p is the number of periods