Welcome Forex EA downloads & MT4/MT5 auto-trading resources — EAs, Gold EAs, quant tools and real-world automation.
Sign In Sign Up

Simple Auto Trend Folowing EA For MT5

author EAcpu | 6 reads | 0 comments |
Hi everyone, I have developed an interesting robot for trend trading , and since this is its essence, I recommend using it in assets with this characteristic, such as stocks and indices.

Feel free to test, perform optimizations and share the results here

Transaction logic:

  1. Buying conditions (long):
    The bot will buy when the price breaks through a specific level defined by the ATR value multiplier, indicating a potential uptrend. Open a buy position only if long positions are allowed and there are no short positions.

Attached picture (click to enlarge)
Click to Enlarge

Name: screenshot.png
Size: 6 KB

  1. Conditions of sale (brief):
    The robot sells when the price falls below a certain level, indicating a possible downtrend. Sells will only be executed if short positions are allowed and there are no open buy positions.

Attached picture (click to enlarge)
Click to Enlarge

Name: screenshot.png
Size: 5 KB

Closing transaction:

  1. Buy at closing:
    The buy position will be closed if the price breaks below the lower level, signaling a reversal or reaches take profit or defined stop loss, whichever occurs first
  2. To close a position and sell:
    The sell position is closed when the price breaks through the upper limit, which also indicates a reversal or the take profit or defined stop loss is reached, whichever occurs first

Stop Loss, Take Profit and Trailing Stop:
Stop loss and take profit levels are automatically set using the ATR multiplier, which adjusts based on market fluctuations. Additionally, the Trailing Stop feature moves the stop when the trade is profitable, helping to lock in profits.

APPL capital curve in the first half of the past 10 years

Attached picture (click to enlarge)
Click to Enlarge

Name: screenshot.png
Size: 25 KB


Below I also attach the parameters used in this optimization.

Attached picture (click to enlarge)
Click to Enlarge

Name: screenshot.png
Size: 9 KB

appendix
[EX5] #0045 - Trend Following Levels.ex5 30 KB | 1,328 downloads

appendix
[MQ5] #0045 - Trend Following Levels.mq5 14 KB | 1,633 downloads
screenshot.pngscreenshot.pngscreenshot.pngscreenshot.png
screenshot.pngscreenshot.pngscreenshot.pngscreenshot.png
screenshot.pngscreenshot.pngscreenshot.pngscreenshot.png
screenshot.pngscreenshot.pngscreenshot.pngscreenshot.png
screenshot.pngscreenshot.pngscreenshot.pngscreenshot.png
screenshot.pngscreenshot.pngscreenshot.pngscreenshot.png

Attachment to original post (2)

📦 Summary of post attachments (2)

Below are all the files (2) shared in the reply.

Verification code Refresh