The Trendline EA is a robot that helps you trade using the trendlines drawn on your chart.
You only have to change the description of the trendline to the action that you wish to perform and the robot will do the rest.
Example of a simple Trendline Buy on Touch
- Supported Actions:
- Open Buy/Sell order
- Close Buy/Sell/All orders
- Set Lot size, Stop Loss and Take Profit upon opening of order
- Perform action upon event:
- Touch
- Pullback
- Breakout
Available Commands
- Buy | BoT | BuyOnTouch
- Sell | SoT | SellOnTouch
- BoB | BuyOnBreakout
- SoB | SellOnBreakout
- BoPB | BuyOnPullback
- SoPB | SellOnPullback
- BoFB |BuyOnFalseBreakout
- SoFB |SellOnFalseBreakout
- CaB (Close all Buy orders on touch)
- CaS (Close all Sell orders on touch)
- CaO (Close all orders on touch)
- CP (Close partial volume of order on touch)
- Alert | AoT | AlertOnTouch (Send an alert whenever price reaches the trendline)
- AoB | AlertOnBreakout (Send an alert whenever price breaks above or bellow the trendline)
- AoP | AlertOnPullback (Send an alert whenever price pulls back and touches the trendline)
- AoFB | AlertOnFalseBreakout (Send an alert whenever price makes a false breakout and returns to the trendline)
Parameters
- TP: | TakeProfit:
- Ex: BuyOnTouch TP:200
- SL: | StopLoss
- Ex: SellOnBreakout SL:50
- Volume: | Vol: | V:
- Ex: ClosePartial vol:0.02
Some usage examples
- Ex: Sell 0.05 lots on touch of trendline with stop loss of 20 pips and take profit of 50 pips.
SoT SL:20 TP:50 Vol:0.05
- Ex: Buy default lots on breakout of trendline with stop loss of 100 pips
BoB SL:100
- Ex: Close all Sel orders that touch this trendline
CaS
- Ex: Close only 0.01 lots of order that touches this trendline
CP vol:0.01
- Ex: Buy 0.05 lots on breakout of trendline with stop loss of 100 and take profit of 100
BoB SL:100 TP:200 V:0.05
FAQ
- How do the actions BuyOnPullback and SellOnPullback work?
R: These actions work like this:
- First the EA waits for a candle to cross and close on the other side of a trendline
- If after the close, any of the following candles comes back and touches the trendline, the EA will open a trade
![](https://c.mql5.com/6/860/BuyOnPullback-Simple.png)
- How do the actions SellOnFalseBreakout and BuyOnFalseBreakout work?
The SoFB and BoFB are basically commands that will open an order if price breaks the trendline and then reverses back.
![]()
The "Min distance for False Breakouts" value is used to filter the breakouts.
For example if the parameter is set to 100 points and the price breaks the trendline and only moves 50 points further and then reverses, the order will not be opened.
-
In the Settings, what is the difference between Types of breakouts?
- On close of candle – the order will only be opened after the candle closes after breaking the trendline.
- On distance in pips – the order will be opened as soon as price breaks the trendlines by the number of pips defined in “Breakout distance in pips“.
In the Settings, what is the difference between Types of breakouts?
- On close of candle – the order will only be opened after the candle closes after breaking the trendline.
- On distance in pips – the order will be opened as soon as price breaks the trendlines by the number of pips defined in “Breakout distance in pips“.
Buy on Breakout with on close of candle active
Buy on Breakout with on distance in pips active
Any suggestions or issues please don’t hesitate to contact me.