[ult_buttons btn_title=”NEXT” btn_link=”||” btn_align=”ubtn-center” btn_size=”ubtn-custom” btn_width=”1200″ btn_height=”50″ btn_bg_color=”#feb600″ icon_size=”32″ btn_icon_pos=”ubtn-sep-icon-at-left”]

How to DO Multiple Trades the Better Way

In the last video, our EA opened 10 trades at a time. That’s pretty useless. So we want to modify it to open trades a more intelligent way. I have included a new module called CheckForNewCandle.mq4 and here is what it does. It will create a static candle counter and if the amount of candles is still the same, it will return the value false, otherwise, it will set the current chart candles counter and assign the value of bars.

If you hit the F1 key, you see it’s the current bars on the chart and if the value of bars has changed, it will return true. So from now on, we only want to call the CheckBollingerBandTrade() function if there is a new candle on the chart. That will also save resources. Let’s compile that. Please hit the F4 key and start a new test. This time it only did open 2 orders. This is a good example where you can see that there are multiple re-entries where the BollingerBands Expert Advisor could open new trades.