SendClose – EA MetaTrader 5

The Expert Advisor opens or closes positions at the intersection of lines.

Author of the ideaย โ€”ย Vladimir Khlystov,ย author of the MQL5 codeย โ€”ย barabashkakvn. ย 

The EA draws 4 lines: “LINE BUY”, “LINE SELL” and two “CLOSE” lines.ย 

Your task is to move the lines to positions where you intend to perform a specific action to a position. I.e. ะ’uy, Sell, Close.

Positions are opened or closed when the Ask is above the corresponding line and Bid is below. I.e. when the price crosses one of the four lines.

The figure shows an example of trading.

The number of lines can be reduced using the variables:

  Standard_Error_Bands - indicator MetaTrader 5

DRAW_SELL โ€” draw the Sell line
DRAW_BUY โ€” draw the Buy line
DRAW_CLOSE1 โ€” draw the Close1 line
DRAW_CLOSE2 โ€” draw the Close2 line

Additional external variablesย lot โ€” lot size andย order โ€” maximum number of orders. CLOSE lines can be used as a trailing stop when placed at a certain angle.


๐Ÿ“ˆ ROBOTFX MetaTrader Expert Advisors and Indicators to maximize profits and minimize the risks