The Trendline EA allows you to trade directly from the trendlines drawn on your chart. Simply edit the trendline’s description with the desired command and the EA will perform the action automatically.
This tool is ideal for traders who want quick, rule-based entries using trendline touches, pullbacks and breakouts—without manually executing orders.
📌 Basic Example

Example: Buy On Touch of a trendline
🎯 What the EA Can Do
- Open trades (Buy/Sell)
- Close trades (Buy only, Sell only, or all)
- Set Lot Size, Stop Loss and Take Profit automatically
Supported execution events:
- Touch
- Pullback
- Breakout
📘 Available Commands
Use these inside the trendline description:
- 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 on touch)
- Alert | AoT | AlertOnTouch
- AoB | AlertOnBreakout
- AoP | AlertOnPullback
- AoFB | AlertOnFalseBreakout
⚙️ Parameters
- TP: / TakeProfit:
- Example: BuyOnTouch TP:200
- SL: / StopLoss:
- Example: SellOnBreakout SL:50
- Volume: / Vol: / V:
- Example: CP vol:0.02
📌 Usage Examples
- Sell 0.05 lots on touch with SL=20 and TP=50:
SoT SL:20 TP:50 Vol:0.05
- Buy on breakout with SL=100:
BoB SL:100
- Close all Sell orders on trendline touch:
CaS
- Close only 0.01 lots on touch:
CP vol:0.01
- Buy 0.05 lots on breakout with SL=100 and TP=200:
BoB SL:100 TP:200 V:0.05

❓ FAQ
How do BuyOnPullback and SellOnPullback work?
First a candle must close on the opposite side of the trendline. If a later candle returns and touches the line, the EA executes the order.


How do BuyOnFalseBreakout and SellOnFalseBreakout work?
These actions trigger when price breaks through the trendline and then reverses back, forming a false breakout.

Minimum distance filters weak breakouts.
If set to 100 points, but price only moves 50 points before returning, no trade will be opened.

What is the difference between the types of breakouts?
- On close of candle: order opens only after the candle closes beyond the trendline.
- On distance in pips: order opens as soon as price exceeds the trendline by the defined number of pips.
Breakout triggered on candle close
Breakout triggered by distance in pips
If you have questions or suggestions, feel free to message me anytime.


