Loading…

Sentiment Extreme Fade System

MQL4 has no built-in retail-positioning feed, and no network access suitable for pulling one live. This EA does not attempt to fake that - it reads a plain CSV file the trader (or a separate scheduled export, script, or manual copy from a broker's published positioning page) drops into the terminal's MQL4\Files\ (or MQL5\Files\ on the native MQL5 build) folder, in a documented format: one header row, then rows of Symbol,LongPercent,ShortPercent,Timestamp. When the row matching the chart's symbol reports one side at or beyond a configurable extreme threshold, the EA takes the other side, on the standard contrarian premise that a heavily one-sided retail book is a poor-odds crowd to join. Every read is defensive: a missing file, a missing row for the symbol, an unparseable timestamp, an out-of-range percentage, or data older than InpMaxDataAgeMinutes all leave the EA flat rather than trading on a guess - the Comment panel always shows the last read status so a stale or broken feed is visible at a glance, not a silent failure. Notes and limitations - This EA is only as good as the feed it is pointed at. It validates the file's structure and freshness, but cannot verify that the numbers themselves are accurate - garbage in the CSV is still garbage the EA will act on if it parses and passes the freshness check. - The retail-positioning contrarian premise is a documented heuristic, not a guaranteed edge; it has historically worked better as one input among several than as a standalone signal. - Only one position at a time; a new extreme reading is ignored while a trade from a previous reading is still open. - Lot sizing uses MODE_TICKVALUE/MODE_TICKSIZE, not a hardcoded contract size.

Expert advisor · MT5 · v1.0 · Free

About Sentiment Extreme Fade System

Sentiment Extreme Fade System is an expert advisor (trading robot) for MetaTrader 5 based on ATR. It can size trades from your balance and risk percent. It has 15 settings, such as Data file name, Extreme long percent and Extreme short percent. MQL source code included.

Files in the download: SentimentExtremeFade.ex5, SentimentExtremeFade.mq5, SentimentExtremeFade.txt.

Trading robots can lose money. Check every setting and test on a demo account before using real funds.

Settings

SettingDefaultWhat it does
Data file nameSentimentExtremeFade_sentiment.csvFile in MQL5\Files\ - see .txt for the exact format
Extreme long percent70.0Fade to SHORT once reported long% is at/above this
Extreme short percent70.0Fade to LONG once reported short% is at/above this
Max data age minutes240Refuse to trade if the file's timestamp is older than this
File recheck seconds300Minimum seconds between re-reading the file
Atr period14ATR period used for the stop and target
Stop atr multiple2.0Stop distance as a multiple of ATR
Target atr multiple3.0Target distance as a multiple of ATR
Use risk sizingtrueSize by percent risk to the stop instead of a fixed lot
Risk percent1.0Percent of equity risked per trade, when risk sizing is on
Fixed lots0.10Lot size when risk sizing is off, or as a sizing fallback
Magic number35501Magic number for orders opened by this EA
Slippage pips3Slippage tolerance, in pips
Max retries5Attempts per trade action before giving up
Retry wait ms500Pause between attempts, milliseconds

How to install

  1. Download the ZIP from your PolyMaria library and unzip it.
  2. In MetaTrader 5 open File → Open Data Folder, then go to MQL5 → Experts.
  3. Copy the .mq5 file(s) there. Put any .mqh files in MQL5 → Include.
  4. Open the .mq5 file in MetaEditor and press Compile (F7) if MetaTrader does not show it.
  5. Drag the expert advisor from the Navigator onto a chart, check the settings, allow Algo/Auto Trading and press OK.
  6. Test it first on a demo account or in the Strategy Tester.

Download the PDF guide

Tags: Risk & Lot Size · ATR · MT5 Expert Advisor · MQL5 Source Code

Expert advisors (EA) for MT4 & MT5 · PolyMaria