Skip to content
All library documents

A Single-Layer Perceptron Expert Advisor Using RSI Crossings

Article MQL5 code base

Summary

This expert-advisor design turns four RSI readings into a single weighted perceptron score. It uses RSI periods of 12, 36, 108, and 324, rescales each indicator around zero, and combines them with weights selected through optimization. The trading threshold is zero: a score crossing from negative to positive triggers a long position, while a crossing from positive to negative triggers a short position. Existing positions in the opposite direction are closed before the new order is sent.

The article suggests that other oscillators could replace RSI and gives a basic optimization setup using open-price-only modeling. The material describes signal construction and order handling, but supplies no reported backtest results or risk controls such as stop-loss or take-profit levels. Its optimization settings and chosen weights therefore require independent validation, and the simple threshold rule alone does not establish that the strategy has an edge.

Key ideas

  • Four RSI readings at different lookback periods are centered around zero and combined with optimized weights.
  • The perceptron score uses zero as its decision threshold.
  • A sign change from negative to positive opens a long position, while the reverse change opens a short position.
  • The EA closes an opposite position before placing a new directional order.
  • The article provides no performance evidence or explicit protective exit rules.

Tags

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