Skip to content
All library documents

RSI Expert Advisor with Trading Hours, Trailing Stops, and One Position

Article MQL5 code base

Summary

This document describes a revised RSI-based Expert Advisor. It buys when RSI enters an oversold zone and sells when RSI enters an overbought zone. The advisor processes each market tick and allows the user to enable buying, selling, or both. It maintains at most one open position at a time, so the description says it can be used with either hedging or netting accounts.

The revision adds intraday time controls, including intervals that can cross midnight, and a trailing stop. It also changes the position-opening functions. A configuration caveat concerns signal-based closing: when that option is disabled, the user should set a stop loss or take profit. The document provides no parameter values, tests, or performance results, and does not specify how RSI zones are configured. It therefore explains the advisor’s mechanics and controls but supplies no evidence that its entry signals are profitable or suitable for a particular market.

Key ideas

  • The advisor buys on entry into an RSI oversold zone and sells on entry into an overbought zone.
  • Users can enable buy trades, sell trades, or both directions.
  • Trading-hour controls can define an interval that crosses midnight.
  • A trailing stop is available, and the advisor allows only one open position at a time.
  • If signal-based closing is disabled, a stop loss or take profit should be configured.

Tags

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.