The FXTT Trendline EA for MT4  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)


  • TP: | TakeProfit:
    • Ex: BuyOnTouch TP:200
  • SL: | StopLoss
    • Ex: SellOnBreakout SL:50
  • Volume: | Vol: | V:
    • Ex: ClosePartial vol:0.02

Some usage examples

  1. 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

  2. Ex: Buy default lots on breakout of trendline with stop loss of 100 pips

     BoB SL:100

  3. Ex: Close all Sel orders that touch this trendline


  4. Ex: Close only 0.01 lots of order that touches this trendline

    CP vol:0.01

  5. 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

    Buy on Breakout of trendline

    Buy 0.05 lots on breakout of trendline with stop loss of 100 and take profit of 100

How to install the EA

1 – Download the EA file ​​(Keep note of the location of where you saved it.)
2 – Navigate to the Experts folder of your Metatrader 4.
(You can easily find this folder by opening your Metatrader 4 and selecting the menu option: File => Open Data Folder and then opening the folder \MQL4\Experts)
3 – Next you need to copy (or move) the file into the Experts folder. A pop-up requesting admin permission may appear; if so, just click Continue.
4 – Restart your Metatrader 4. The EA FXTT_TrendlineEA should now appear inside your Expert Advisors


  1. How do the actions BuyOnPullback and SellOnPullback work?

    Buy on Pullback example

    Buy on Pullback example


    Sell on Pullback example

    Sell on Pullback example


  2. In the Settings, what is the difference between Types of breakouts?
    1. On close of candle – the order will only be opened after the candle closes after breaking the trendline.
    2. 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 on close of candle

Buy on Breakout with on close of candle active

Buy on Breakout on distance in pips

Buy on Breakout with on distance in pips active


Trading involves risk of loss. Forex trading is risky, and most traders lose money. Past performance is not necessarily indicative of future results.

Carlos Oliveira cartoon

Any suggestions or issues please don’t hesitate to contact me.