Expert Advisors • Indicators • Scripts • Libraries

MQL.RobotFX.org is the biggest collection of MetaTrader expert advisors (MT5 & MT4), indicators, scripts and libraries that can be used to improve trading results, minimize risks or simply automate trading tasks

MetaTrader 5 Expert Advisor | Two PerBar

The author of the idea - Scriptor

mq5 code author - barabashkakvn

The Expert Advisor is designed to work only on hedge accounts: it opens BUY and SELL positions at once.

Inputs: 

  • Lots - position volume if there are no open positions at the moment
  • Lots coefficient - position increase ratio if there are open positions at the moment
  • Lots max - maximum volume limitation
  • Take Profit (in points) - take profit set in points
  • magic number - unique EA identifier

Example of "points":

MetaTrader Experts, Indicators, Scripts and Libraries

When a new bar appears, the EA closes positions and opens BUY and SELL ones simultaneously. The expectation is that within the bar, one of the positions will close by take profit and the trend will reverse a little.

22465