RobotFX curates the best open-source MetaTrader code to inspire your trading automation.
Your EA's signal logic is good — but some days it trades too much, other days too little. ASQ Frequency Controller scales 8 filter parameters simultaneously with a single factor, letting you dial trade frequency up or down without touching your entry logic. Switch between Ultra-Conservative and Scalper mode with one button. The auto-frequency mode reads ATR and adjusts for you.

FEATURES:
- 5 frequency modes — Ultra-Conservative (0.5x), Conservative (0.75x), Normal (1.0x), Aggressive (1.5x), Scalper (2.0x)
- 8 filter parameters scaled dynamically — cooldown, spread tolerance, ATR range, min bars, min distance, signal strength thresholds
- Runtime +/- fine-tuning with configurable step size
- Auto-frequency from volatility — pass current ATR, frequency adapts to market conditions automatically
- Daily trade limiter — SetMaxTradesPerDay() caps entries, auto-resets at midnight
- Effective values snapshot — GetSnapshot() returns all scaled values in a single struct for dashboard use
- Interactive chart buttons — click to switch modes or fine-tune factor
- Safe floors on signal thresholds — strength never drops below 0.2/0.3 even at 3.0x
HOW THE SCALING WORKS:
Higher frequency factor = MORE trades accepted:
— Cooldown: divided (shorter wait between trades)
— Max spread: multiplied (wider spreads accepted)
— Min ATR: divided (lower volatility accepted)
— Min bars: divided (fewer bars between entries)
— Min distance: divided (closer to existing positions)
— Signal strength: divided by sqrt (weaker signals accepted, with floor)
Unique stair-step trend trading with the Stairsteps Expert Advisor. Innovative approach for consistent results. Learn more.

DEMO EA INCLUDED:
Attach to any chart for the interactive dashboard:
— Mode selector with 5 buttons (UC/CONS/NORM/AGGR/SCALP) plus +/- fine-tuning
— Frequency factor visualization bar
— Base vs Effective comparison table for all 8 filter parameters
— Daily trade counter with remaining trades
— Auto-frequency status
USAGE:
#include "ASQ_FrequencyControl.mqh"
CASQFrequencyControl freq;
freq.Initialize(1.0, 0.25, 0.25, 3.0);
freq.SetBaseFilters(60, 1.5, 0.3, 5.0, 3, 10.0, 0.5, 0.6);
freq.SetMode(ASQ_FREQ_NORMAL);
freq.SetMaxTradesPerDay(10);
int cooldown = freq.GetEffectiveCooldownSec();
if(freq.CanTradeToday()) { /* entry logic */ }
Place both files in the same folder — compiles instantly, no subfolder setup needed.
This is the open-source frequency engine behind Quant Cristina on the MQL5 Market. Same logic, same accuracy.
FILES:
- ASQ_FrequencyControl.mqh — Library (438 lines)
- ASQ_FrequencyControl_Demo.mq5 — Demo EA (277 lines)
MetaTrader 5, all brokers, all instruments, all timeframes.
Free and open-source. 715 lines of production MQL5.
AlgoSphere Quant — Precision before profit.
Complement community code with advanced automation from RobotFX.
71484