LOGIN

Join & EARN

FOREX ALGOS { }

What We Do

BlackBox

Backtest Results How It Works Full Refund Promise Supported Brokers Income Targets

Robots Glossary

OnTick, OnInit, OnDeinit

In MQL5 (and recent MQL4), these are special event handler functions for EAs/indicators. OnInit() runs once when the EA/indicator is attached, OnTick() runs on each new tick, and OnDeinit() runs when the EA is removed or terminal closes. In legacy MQL4, similar roles were init()start(), and deinit(). These handlers are where traders code their logic for reacting to market data.