Forum

1 trade per candle, up to a max number of trades?

Hi, I am new to programming in MQL and have had a good look on the site to try and answer this question but to no avail. I only want to enter one trade per candle but if, on the next candle, the signal still holds the EA should make another trade up to a maximum number of lots. I think I understand

iATR calculation error?

Trying to get iATR from MT4, value appears wrong by at least a factor of 10, how to auto-correct please. Code is: double spread = MarketInfo(Symbol(),MODE_SPREAD); double minlot = MarketInfo(Symbol(),MODE_MINLOT); double lotstep = MarketInfo(Symbol(),MODE_LOTSTEP); double margin =