Tectonic Structure Engine

An MQL4 library that maps market structure for your EA, indicator or script: confirmed swings labelled HH, HL, LH, LL, EQH and EQL, break of structure (BOS), change of character (CHoCH), liquidity sweeps, order blocks and fair value gaps with fill tracking, and the position of price in the dealing range. It reads closed bars only and never repaints. It does not trade, draw or alert. You receive the compiled Tectonic_Structure_Engine.ex4; this page is the full API reference.

Quick Start

  1. Copy Tectonic_Structure_Engine.ex4 to MQL4/Libraries (File > Open Data Folder).
  2. Paste the #import block below into your program.
  3. In OnInit: h = TSE_Create("", 0, 3, 1000); optionally TSE_Configure.
  4. Call TSE_Update(h) in OnTick or OnCalculate. Without a new bar it returns 0 in about a microsecond.
  5. Read TSE_Trend, TSE_GetEvent, TSE_NearestZone and the rest; TSE_Release(h) in OnDeinit.
  6. Verify: run the example below in the Strategy Tester (any symbol, M15). The journal lists each event; the first update lists the whole history.

Import Declaration (Copy-Paste Ready)

#import "Tectonic_Structure_Engine.ex4"
   int    TSE_Create(string symbol, int timeframe, int strength, int history_bars);
   bool   TSE_Configure(int handle, int break_mode, double min_swing_atr, double equal_tol_atr, double fvg_min_atr, int atr_period);
   void   TSE_Release(int handle);
   int    TSE_Update(int handle);
   int    TSE_Trend(int handle);
   int    TSE_SwingCount(int handle);
   bool   TSE_GetSwing(int handle, int index, int &side, double &price, datetime &time, int &label);
   int    TSE_EventCount(int handle);
   bool   TSE_GetEvent(int handle, int index, int &type, double &level, datetime &swing_time, datetime &break_time);
   bool   TSE_GetLevels(int handle, double &swing_high, double &swing_low, bool &high_broken, bool &low_broken);
   double TSE_RangePosition(int handle, double price);
   int    TSE_ZoneCount(int handle);
   bool   TSE_GetZone(int handle, int index, int &kind, int &dir, double &top, double &bottom, datetime &time, int &state, double &fill);
   int    TSE_NearestZone(int handle, int kind, int dir, double price, double &top, double &bottom);
   int    TSE_GetStats(int handle, int &stats[]);
   int    TSE_LastError();
   string TSE_ErrorText(int code);
   string TSE_LabelText(int label);
   string TSE_EventText(int type);
   string TSE_ZoneText(int kind, int dir);
   string TSE_StateText(int state);
#import 

Codes

  • Swing labels: 1 HH, 2 LH, 3 EQH (highs); -1 LL, -2 HL, -3 EQL (lows); 0 FIRST (no earlier swing on that side).
  • Event types: 1 BOS UP, -1 BOS DOWN, 2 CHOCH UP, -2 CHOCH DOWN, 3 SWEEP HIGH, -3 SWEEP LOW.
  • Zone kind: 1 fair value gap, 2 order block. dir: 1 bullish (support), -1 bearish (resistance). Texts: BULL FVG, BEAR FVG, BULL OB, BEAR OB.
  • Zone state: 0 FRESH (untouched), 1 TESTED (price entered), 2 FILLED (FVG traded through), 3 BROKEN (OB closed through).
  • Errors: 0 OK, -1 BAD HANDLE, -2 BAD PARAMETERS, -3 NO HISTORY, -4 NO FREE SLOT, -5 BAD INDEX. Text functions return UNKNOWN for other codes.

How Each Closed Bar Is Read

  1. Zones: a low inside a bullish zone (a high inside a bearish one) sets TESTED and raises fill, the deepest penetration in % of the zone height. An FVG becomes FILLED when price reaches its far edge; an OB becomes BROKEN on a close beyond its far edge (fill can reach 100% while the OB stays active).
  2. Swings: the bar strength bars back is a swing high when its high is above the strength bars before it and not below the strength bars after it (lows mirrored). A swing is reported strength bars late and never moves. With min_swing_atr above 0, the high minus the lowest low of the 2 x strength + 1 bars must be at least min_swing_atr x ATR. Label against the previous swing of the same side: within equal_tol_atr x ATR is EQH or EQL, otherwise HH or LH, LL or HL. The newest swing high and swing low are the break levels.
  3. Breaks: break_mode 0 needs a close beyond the level, 1 a wick. Breaking the swing high gives CHOCH UP when the trend was -1, otherwise BOS UP; the trend becomes 1 and the level is used up. Lows mirrored. In close mode a wick beyond with a close back inside is a SWEEP, once per level.
  4. Order block: on every BOS or CHoCH, the last opposite candle (bearish for an up-break) at or up to 10 bars before the extreme of the leg between swing and break; the zone is its high-low range.
  5. Fair value gap: third candle low above first candle high (bullish), or third high below first low (bearish), at least fvg_min_atr x ATR tall.

ATR is the simple average true range over atr_period bars.

API Reference

TSE_Create

symbol: "" or NULL = chart symbol; must exist. timeframe: 0 = chart period, else PERIOD_M1 to PERIOD_MN1. strength: 1-50. history_bars: 100-20000, built on the first update. Returns a handle 0-31, or -1 with BAD PARAMETERS or NO FREE SLOT. Defaults: break_mode 0, min_swing_atr 0, equal_tol_atr 0.10, fvg_min_atr 0.25, atr_period 14.

TSE_Configure

break_mode 0-1, min_swing_atr 0-10 (0 = off), equal_tol_atr 0-5, fvg_min_atr 0-10, atr_period 1-500. Clears the handle; the next TSE_Update rebuilds. Any value out of range: false, BAD PARAMETERS, nothing changed.

TSE_Release

Frees the handle for reuse. Call it in OnDeinit.

TSE_Update

Reads the closed bars not seen yet; the first call builds history_bars. Returns the number of new events (indexes 0 to n-1 of TSE_GetEvent), 0 without a new bar, or -1: BAD HANDLE, or NO HISTORY while fewer than 2 x strength + 4 bars are loaded (call again on the next tick). If the last bar read disappears (history reloaded), the handle rebuilds by itself.

int n = TSE_Update(h);
if(n > 0) Print(n, " new events"); 

TSE_Trend

1 after an upward break, -1 after a downward break, 0 before the first break or for a bad handle.

TSE_SwingCount and TSE_GetSwing

Stored swings, newest at index 0: side (1 high, -1 low), price, time of the swing bar, label. Count -1 for a bad handle; outside 0 to count-1 TSE_GetSwing returns false with BAD INDEX.

TSE_EventCount and TSE_GetEvent

Stored events, newest at index 0: type, level (the swing price), swing_time, break_time (the bar that broke or swept it).

TSE_GetLevels

The newest swing high and swing low (0.0 if none yet) and whether each is already broken. An intact level is the next BOS or CHoCH trigger.

TSE_RangePosition

Where price sits between those two levels: 0 = swing low, 50 = equilibrium, 100 = swing high, below 0 or above 100 outside. price 0 = Bid of the handle's symbol. EMPTY_VALUE when a level is missing or high is not above low. The demo shows DISCOUNT below 45 and PREMIUM above 55.

TSE_ZoneCount and TSE_GetZone

Stored zones of every state, newest at index 0: kind, dir, top, bottom, time (FVG: middle candle; OB: the candle), state, fill 0-100.

TSE_NearestZone

Nearest FRESH or TESTED zone to price (0 = Bid); distance 0 inside a zone, ties go to the newer zone. kind: 0 any, 1 FVG, 2 OB. dir: 0 any, 1, -1. Returns its index for TSE_GetZone and fills top and bottom; -1 if none (error OK) or BAD PARAMETERS.

double top, bottom;
int z = TSE_NearestZone(h, 2, 1, 0, top, bottom);   // nearest bullish order block 

TSE_GetStats

Pass a dynamic int array; it is resized to 12 and 12 is returned: 0 bars read, 1 swing highs, 2 swing lows, 3 BOS UP, 4 BOS DOWN, 5 CHOCH UP, 6 CHOCH DOWN, 7 SWEEP HIGH, 8 SWEEP LOW, 9 FVGs, 10 OBs, 11 zones active now. Counts since the last build.

TSE_LastError and the text functions

TSE_LastError: code of the last call. TSE_ErrorText, TSE_LabelText, TSE_EventText, TSE_ZoneText(kind, dir) and TSE_StateText return the strings listed under Codes.

Working Integration Example

#import "Tectonic_Structure_Engine.ex4"
   int    TSE_Create(string symbol, int timeframe, int strength, int history_bars);
   void   TSE_Release(int handle);
   int    TSE_Update(int handle);
   int    TSE_Trend(int handle);
   bool   TSE_GetEvent(int handle, int index, int &type, double &level, datetime &swing_time, datetime &break_time);
   int    TSE_NearestZone(int handle, int kind, int dir, double price, double &top, double &bottom);
   string TSE_EventText(int type);
#import

int h = -1, htf = -1;

int OnInit()
{
   h   = TSE_Create("", 0, 3, 1000);           // chart timeframe
   htf = TSE_Create("", PERIOD_H4, 3, 1000);   // higher-timeframe bias
   return (h >= 0 && htf >= 0) ? INIT_SUCCEEDED : INIT_FAILED;
}

void OnDeinit(const int reason) { TSE_Release(h); TSE_Release(htf); }

void OnTick()
{
   TSE_Update(htf);
   int n = TSE_Update(h);
   for(int i = n - 1; i >= 0; i--)
   {
      int type; double level; datetime st, bt;
      if(TSE_GetEvent(h, i, type, level, st, bt))
         Print(TSE_EventText(type), " at ", level, ", H4 trend ", TSE_Trend(htf));
   }
   double top, bottom;
   if(n > 0 && TSE_NearestZone(h, 2, 1, 0, top, bottom) >= 0)
      Print("nearest bullish OB ", bottom, " - ", top);
} 

Typical Setups

  • Internal and external structure: two handles on one chart, strength 2 and 8.
  • Multi-timeframe bias: chart handle for entries, H4 or D1 handle as a TSE_Trend filter.
  • Wick breaks: TSE_Configure(h, 1, 0, 0.10, 0.25, 14); no sweeps in this mode.
  • Fewer, larger zones and swings: fvg_min_atr 0.5-1.0, min_swing_atr 1.0.

Architecture and Notes

  • One engine per handle, up to 32 handles per program; every importing program has its own. Data lives in memory and is rebuilt from history after a restart.
  • Closed bars only, each read once, oldest first: nothing repaints and bar 0 is never used.
  • Building 20,000 bars took about 80 ms in the MT4 Strategy Tester.
  • Other symbols or timeframes are read with iHigh, iLow, iOpen, iClose and iTime; NO HISTORY is normal while the terminal downloads them. In the Strategy Tester use the tested symbol (any timeframe).
  • Per handle: up to 2000 swings, 2000 events and 500 zones; the oldest 10% are dropped when full.
  • MetaTrader 4 build 600 or later. Safe in the Strategy Tester and optimization. No DLLs, files, global variables, chart objects, timers, alerts or trading.

Risk Notice

The library describes price structure. It does not predict prices or guarantee profits. Test any strategy built on it on a demo account first.

Recommended products
Close All Charts – Instantly Close All Open Charts in MT4 Declutter your workspace and improve efficiency with Close All Charts , a simple yet powerful script that instantly closes all open charts in MT4 with a single click. No more manually closing charts one by one—this tool helps you manage your trading environment effortlessly. Key Features: One-Click Chart Closure – Instantly close all open charts in MT4 with a single action. Streamlined Workspace – Remove unnecessary charts for a c
FREE
One-Click Open 28 – Instantly Load 28 Forex Charts in MT4 Boost your trading efficiency with One-Click Open 28 , a powerful MT4 script that instantly opens 28 major forex pair charts with just one click. No more wasting time setting up charts manually—this tool helps you focus on market analysis and trade execution. Key Features: Instant Chart Setup – Open 28 forex pair charts in one click, eliminating manual setup. Time-Saving Automation – Spend less time opening charts and more time an
FREE
In the dynamic world of trading, visual acuity is paramount for making informed decisions. For traders who struggle with color blindness—a condition that affects approximately 5-10% of males and a much lower percentage of females—distinguishing between buy and sell signals can be particularly challenging. ​ Recognizing this unique challenge, we are proud to introduce “Open Buy Sell Color”, a MetaTrader 4 script designed to enhance visual clarity for all traders. This tool offers customization o
FREE
One-Click Close All – Instantly Exit All Trades in MT4 Take control of your trades with One-Click Close All , a powerful MT4 script designed for fast market exits. With a simple drag-and-drop action, you can close all open orders instantly—no more manually closing trades one by one. Key Features: Instant Order Closure – Exit all open trades with a single click, perfect for volatile markets. Drag & Drop Simplicity – No complex steps—just drop the script onto your chart to execute. Essen
FREE
This product shows you a different view of the market by examining the performance of volume and continuous patterns in the market, then by calculating the behavior of traders and market patterns, calculates the probability of the next movement of the market by calculations. Function. How to receive the signal: If the candlestick is currently a bullish candlestick, according to a market scan, if the next bullish candlestick is below 5%, you can open a free trade by hitting the wisdom areas.
Introducing "TG Risk Service Manager" — your comprehensive toolkit for swift and precise risk management and lot size calculations in the dynamic world of trading. Designed to streamline development processes and enhance trading strategies, this indispensable library equips developers with essential tools for optimizing risk assessment and trade profitability. Metatrader5 Version   | All Products | Contact Key Features: Efficient Lot Size Calculation : Harness the power of precise lot size comp
MT4/5通用交易库(  一份代码通用4和5 ) #import "K Trade Lib.ex4"    //简单开单    long OrderOpen( int type, double volume, int magic, string symbol= "" , string comment= "" , double opprice= 0 , double sl= 0 , double tp= 0 , int expiration= 0 , bool slsetmode= false , bool tpsetmode= false );    //复杂开单    void SetMagic( int magic, int magic_plus= 0 ); void SetLotsAddMode(int mode=0,double lotsadd=0);    long OrderOpenAdvance( int mode, int type, double volume, int step, int magic, string symbol= "" , string comme
FREE
Important: This product is a Library for developers . It is suitable only for users who can write/modify MQL4 code and integrate a compiled library into their own EA/Script. It is not a “drag & run” notifier. Telegram SDK helps you send Telegram messages and photos from MetaTrader 4 in a simple and reliable way. Use it when you want Telegram notifications inside your own automation tools. If you need the MetaTrader 5 version, it is available separately in the Market:   Telegram SDK M T5 . Main f
Boxing Gold Ai Robot
Nirundorn Promphao
I will support only my client. สำหรับลูกค้า Some Features: - Swing or ZigZag or Sideway trading - No News filter to high impact news, It will dash with Martingale with Position Percent from Lot size starter,   Increase / Decrease via amount of position on chart. - You can run it on sideway chart at current timeframe or H4-D1 timeframe. - If chart has trend don't worry with your small lot size starter and frequncy and your funding. - You can always consult with me on how to use it via chat. Wa
Friends, join us! Ask questions and connect with like-minded traders: MetaCOT Public Group MetaCOT Information Channel: news, CFTC reports, and signals: MetaCOT Channel Here’s to successful trading and new profitable signals for us all! Attention! Recently, certain countries have been blocking access to the cftc.gov website. As a result, users in these countries are giving the product low ratings. MetaCOT has always adhered to the highest quality standards and is in no way associated with th
The   UZFX - Delete All Drawing and Objects on Chart Instantly   is a simple yet powerful MetaTrader 4 (MT4) script designed to instantly remove all drawing objects from the active chart. This script is useful for traders who need to quickly clear their charts from technical analysis drawings, trend lines, Fibonacci tools, text labels, and other objects without manually deleting them one by one. If you are Looking Best indicators in Mql5 Market. Check these out! SSS Scalping Smart Signals MT5
FREE
Update History 28 – Instantly Refresh Historical Data for 28 Major Currency Pairs Keep your market analysis accurate and up to date with Update History 28 , a powerful script that refreshes historical data for 28 major forex pairs in MT4 with just one click. No more manually updating charts—this tool ensures you always have the latest price history for precise trading decisions. Key Features: One-Click Data Refresh – Instantly update historical data for 28 major forex pairs. Enhanced Mar
FREE
Profitstat premium version scans your trading history and displays performance on the chart. The premium version is far more flexible than the free one. The premium version contains the following features that you won't find in the free version: Ability to horizontally position the indicator as you prefer. Ability to display results in money or in pips with the option to hide or display one or both of them. An option to show stats for only the chart symbol. An option to only show data from a cer
This simple logging library is designed to provide clear and contextual log output with minimal hassle. It exposes five  methods: LogErrorMessage(message) LogWarn Message (message) LogInfo Message (message) LogDebug Message (message) LogTrace Message (message) Each method prints the provided message to the console only if the severity level meets or exceeds the current threshold set by a global variable logLevel. This means you control the verbosity of your application's logs by adjusting logLev
FREE
Scalping Strategy Having a strategy in the market is one of the main conditions for trading. The presence of various and complicated indicators and tools sometimes makes trading difficult, and the user gets confused after trying various methods and gets stuck in a loss cycle, the result of which is usually clear. This indicator is a simple strategy based on the detection of pivots and short-term trends, which helps you to easily trade in trends. Sometimes a simple but efficient strategy has a be
Friends, join us! Ask questions and connect with like-minded traders: MetaCOT Public Group MetaCOT Information Channel: news, CFTC reports, and signals: MetaCOT Channel Here’s to successful trading and new profitable signals for us all! Attention! Recently, certain countries have been blocking access to the cftc.gov website. As a result, users in these countries are giving the product low ratings. MetaCOT has always adhered to the highest quality standards and is in no way associated with th
FREE
Hello Guys! I want to share with you a very useful tools. Anyone of us who has used MT4 for some time knows how impractical this platform can be for discretionary trading. That's why I created this graphical interface!  Interface is very simple, all the info that you need are in the video and in the screenshot. NB: Before to run the EA Interface, remember to copy the file in the comment in your MT4 folder "Controls". PATH: .../MQL4/INCLUDE/CONTROLS NB: unfortunately the interface can't be test
The Chart Navigator is a powerful and user-friendly indicator designed to enhance your chart navigation experience in the MetaTrader platform. With its advanced features and intuitive interface, it enables traders to effortlessly explore multiple timeframes, switch between symbols, and efficiently analyze price movements. Key Features: Timeframe Navigation: Seamlessly switch between different timeframes with just a single click. The Chart Navigator provides a graphical object that allows you to
FREE
AI Trade Analyzer  is an intelligent market analysis tool implemented in the indicator format. The program visualizes signals on the chart and helps the trader evaluate the market situation based on technical indicators and news background. All signals and levels are for guidance only and should be validated with your own trading strategy and risk management. Supported Models: Compatible with the latest ChatGPT versions — GPT-5.1 , GPT-4o , GPT-4o-mini , O1 , and GPT-3.5-turbo . GPT-5.1 provide
Signal Generator X1n Bands
Kevin Alexander Zuniga Velarde
SignalGenerator_X1nBandas SignalGenerator_X1nBandas is a technical analysis indicator for MetaTrader 4 designed to identify potential buy and sell signals using multiple technical conditions. The indicator combines: • EMA 10 and EMA 21 for trend and crossover analysis • EMA 50 as a trend filter • RSI 14 for momentum confirmation • ADX 14 for trend strength confirmation • Japanese candlestick direction for additional signal confirmation Buy signals are generated when the necessary bullish co
TrendCore Adaptive FX — Smart Expert Advisor for Confident and Adaptive Forex Trading TrendCore Adaptive FX   is a powerful, fully automated trading robot designed for consistent performance in the Forex market. It combines trend-based technical analysis, adaptive lot management, and solid capital protection strategies to ensure robust and efficient trading under real market conditions. Whether you're a professional trader or a long-term investor, this EA offers an intelligent solution to a
The   UZFX - Delete Only Pending Orders   script for MetaTrader 4 (MT4) is a simple yet effective tool that automatically removes all   pending orders   (Buy Limit, Sell Limit, Buy Stop, Sell Stop) from the trading account. This script is ideal for traders who want to clear their pending orders instantly without affecting active market positions. If you are Looking Best indicators in Mql5 Market. Check these out! SSS Scalping Smart Signals MT5 Indicator Scalping Winning Signals Pro SWS LTL L
FREE
Range Volume Profile
Oleksandr Martsynyshen
Range Volume Profile The indicator Range Volume Profile shows the distribution of transactions on the price scale in a given time range. This tool simplifies the analysis of the market situation and helps to find the price levels where a large player is sitting.   Features: shows the distribution of tick volumes relative to the price. shows the distribution of real volumes relative to the price. If your broker provides them. you can select the part of the chart that you want to explore. for cert
Fakeout Detector Indicator The "Fakeout Detector" indicator is a tool designed to assist traders in identifying potential false price movements (fakeouts) in the financial markets. A fakeout is a condition where the price of an asset appears to be moving in one direction but then reverses, causing losses for traders who incorrectly take positions. This indicator helps traders avoid or anticipate fakeouts by identifying key points in price movements. Indicator Output Functions: Arrow Up (Upward A
Universal MarketInfo Service Library for MT4 & MT5 Bring simplicity and power to your trading projects with the Universal MarketInfo Service — a professional library that exposes a unified API for both MetaTrader 4 and MetaTrader 5. No more rewriting code for each platform. With this library, you can: Access symbol data, OHLC prices, spreads, and volatility with a single call. Query account balance, free margin, stop levels, and lot constraints. Work with currency precision, pip values, and n
FREE
Elliott Wave Helper MT4
Siarhei Vashchylka
5 (5)
Elliott Wave Helper is a panel for constructing wave analysis. Manual (Be sure to read before purchasing) | Version for MT5 Advantages 1. Constructing wave analysis and wave structure in a few clicks 2. Availability of all wave analysis patterns, including triangles and combinations 3. All nine wave display styles, including a special circle font 4. Change colors and display styles of wave groups directly from the chart 5. Binding all elements to a set timeframe or timeframes 6. A template syste
With the help of the Fine Market Forex indicator algorithm, you can quickly understand what kind of trend is currently developing in the market. Fine Market is a combined indicator based on several instruments. Fine Market is based on classic basic technical indicators - MA, RSI, MACD, Bollinger Bands, Stochastic. A trader does not need to impose several lines on Forex charts and set up each indicator separately. Fine Market is already successfully combined and has simplified settings, convenie
Mr Pip Scalping Indicator is a momentum indicator that measures the magnitude of recent price changes to evaluate overbought or oversold conditions in the price of a stock or other asset with few major tweaks. This is NOT RSI. Features V2: Added Supply/Demand Filter You can select which zone to see on the chart ( Important Resistance/Support; Verified Resistance/Support; etc ).  You get alerts when prices is entering on a specific supply/demand zone. How to use? When the signal comes, you will
Technical indicator that structures charts and identifies cyclical price movements. Can work on any charts. Several types of alerts. There are additional arrows on the chart itself. Without redrawing on history, works on closing a candle. Recommended TF from M5 and higher. Easy to use and configure parameters. When using 2 indicators with different parameters, you can use without other indicators. Has 2 input parameters Cyclicality and Signal duration These 2 parameters work with the processin
Dublgis
Ivan Simonika
Here is a sensitive indicator for Dublgis professionals. It is built on completely new algorithms and is more efficient, on any timeframes, since it filters random price movements. Finds and visually displays price reversal points. This tool can be used as confirmation when making a deal, as well as to determine the direction of the trend and its strength. The indicator was developed as a complement to a number of our other trading tools.
Buyers of this product also purchase
The library is dedicated to help manage your trades, calculate lot, trailing, partial close and other functions Orders CloseallSell CloseallBuy CloseallOpen DeletePending DeleteAll: Close All Market Orders and delete all pending orders. CheckOpenBuyOrders: return the count of buy orders. CheckOpenSellOrders: return the count of sell orders. CheckOpenOrders: return the count of market orders. ModifyOrder DeleteOrder CloseOrder OpenOrder Lot Calculation Mode 0: Fixed Lot. Mode 1: Martingale Lot
Library for an Expert Advisor. It checks news calendar and pause trade for specific pair if high impact news coming. News Filter for an Exert Advisor. Easily apply to your EA, just needs simple scripts to call it from your EA. Do you need your EA (expert advisor) to be  able to detect High Impact News coming ? Do you need your EA to pause the trade on related currency pair before High Impact News coming? This News Filter library is the solution for you. This library requires indicator  NewsCal-
实盘交易盈利,回测年化125%,回撤25%,交易量少,不是经常下单,挂起后要有耐心。没有多牛的技术,只是一套简单的交易策略,贵在长期坚持,长期执行。我们有时候就是把自己高复杂,想想我们交易的历程,你就会发现,小白好赚钱,当你懂得越多的时候也是亏损的开始,总是今天用这个技术,明天用那个指标,到头来发现,没有一个指标适合你。其实每个技术指标都是概率性的,没有100%的胜率。很多技术指标你要融合一套交易策略,资金仓位控制,止损止盈比例,一套策略下来下一步你做的就是执行力了,必须要坚决执行你的交易策略,如果不能坚持的话最终还是在亏损。说实话不是每个人都有好的心态和执行力,所以我们做出来这款ea自己来用,发现时间久了扭亏为盈了,那现在就拿出来给大家分享,让更多的人来达到自己的盈利目标。购买后留下邮箱或添加软件里的qq,我们会根据你的资金来调整软件参数。 经测试过的柱数 14794 用于复盘的即时价数量 51321985 复盘模型的质量 n/a 输入图表错误 213935 起始资金 10000.00 点差 当前 (54) 总净盈利 12583.42 总获利 37630.02 总亏损 -25046.
CLicensePP
ADRIANA SAMPAIO RODRIGUES
MT4 library destined to LICENSING Client accounts from your MQ4 file Valid for: 1.- License MT4 account number 2.- License BROKER 3.- License the EA VALIDITY DATE 4.- License TYPE of MT4 ACCOUNT (Real and / or Demo) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +++++++++++++++++++++++++++++++++++++++++++++++++++ ++++++ +++++++++++++++++++++++++++++++++++++++++++++++++++ ++++++
Richestcousin
Vicent Osman Kiboye
INSTAGRAM Billionaire: @richestcousin PIONEER OF ZOOM BILLIONAIRES EA THE ONLY PROFITABLE TRADING ROBOT. To trade without withdrawals is Scamming. Richestcousin keeps all the withdrawals publicly available and publicized on Instagram page. The trades are fr His very own Robot software. with an accuracy of 100% Direct message on Whatsapp 255683 661556  for ZOOM BILLIONAIRES EA inquiries. ABOUT Richestcousin is a self made Acclaimed forex Billionaire with an unmatched abilities in discerni
RedeeCash 4XLOTS
Patrick Odonnell Ingle
DATE VERSION DESCRIPTION OF CHANGES 2011-09-11 Manual Algorithm first created as manual equation 2011-09-16  WEB API Web API launched on 4xlots.com 2022-09-02  1.00  standalone library released  RedeeCash 4XLOTS library is a localized risk management library based on the 4xlots.com WEB API algorithm. This risk management algorithm is not dependent on currency as the quick lot size equation of,       lots = AccountEquity / 10000 which is for every $100 of account equity will have 0.01 lot. The R
Use a plain google sheet to license your product After years of developing trading software, I noticed the lack of a simple and cheap system to license the software to your customer.  Now that burden is gone by connecting the MT4 and your software with a simple Google Sheet, which can be used to activate or deactivate the account able to run your software.  With a minimum setup you'll be able to compile your software and distributing it without the fear of being spoiled by hackers or bad people
Ai Prediction MT4
Mochamad Alwy Fauzi
A free indicator for those who purchase the full version This indicator is created by this Ai, with your desired settings Artificial Intelligence at your service Have a complete artificial intelligence and use it in your codes This artificial intelligence is trained to tell you on each candle whether the market is moving up or down. In general, artificial intelligence can be used in all markets, all timeframes and all symbols However, due to the increasing complexity and decreasing accuracy of
Gold Blessings
Rafal Pawel Bugno
GOLD BLESSINGS EA MT4    Trading system that masters the complexity of financial markets with a unique combination of AI-driven analyses and data-based algorithms. Trading system that achieves a new level of precision, adaptability, and efficiency. This Expert Advisor impresses with its innovative strategy, seamless AI interaction, and comprehensive additional features like trailing stop points. Equity required range $1k-$10k Developed for constant profit and slow grow also can be used for compo
A library for creating a brief trading report in a separate window. Three report generation modes are supported: For all trades. For trades of the current instrument. For trades on all instruments except the current one. It features the ability to make reports on the deals with a certain magic number. It is possible to set the time period of the report, to hide the account number and holder's name, to write the report to an htm file. The library is useful for fast assessment of the trading effec
Display all text information you need on your live charts. First, import the library: #import "osd.ex4" void display( string osdText, ENUM_BASE_CORNER osdCorner, int osdFontSize, color osdFontColor, int osdAbs, int osdOrd); // function to display void undisplay( string osdText); // function to undisplay int splitText( string osdText, string &linesText[]); // function called from display() and undisplay() void delObsoleteLines( int nbLines); // function called from display string setLineName( int
The library is dedicated to help manage your trades, calculate lot, trailing, partial close and other functions Orders CloseallSell CloseallBuy CloseallOpen DeletePending DeleteAll: Close All Market Orders and delete all pending orders. CheckOpenBuyOrders: return the count of buy orders. CheckOpenSellOrders: return the count of sell orders. CheckOpenOrders: return the count of market orders. ModifyOrder DeleteOrder CloseOrder OpenOrder Lot Calculation Mode 0: Fixed Lot. Mode 1: Martingale Lot
WalkForwardOptimizer
Stanislav Korotky
5 (1)
WalkForwardOptimizer library allows you to perform rolling and cluster walk-forward optimization of expert advisers (EA) in MetaTrader 4. To use the library include its header file WalkForwardOptimizer.mqh into your EA source code, add call provided functions as appropriate. Once the library is embedded into EA, you may start optimization according to the procedure described in the User guide . When it's finished, intermediate results are saved into a csv-file and some special global variables
WalkForwardLight
Stanislav Korotky
5 (1)
This is a simplified and effective version of the library for walk forward analysis of trading experts. It collects data about the expert's trade during the optimization process in the MetaTrader tester and stores them in intermediate files in the "tester/Files" directory. Then these files can be used by the special WalkForwardBuilder script to build a cluster walk forward report and rolling walk forward reports for refining it. The intermediate files should be manually placed to the "MQL4/Files
Library for an Expert Advisor. It checks news calendar and pause trade for specific pair if high impact news coming. News Filter for an Exert Advisor. Easily apply to your EA, just needs simple scripts to call it from your EA. Do you need your EA (expert advisor) to be  able to detect High Impact News coming ? Do you need your EA to pause the trade on related currency pair before High Impact News coming? This News Filter library is the solution for you. This library requires indicator  NewsCal-
EA introduction:    Gold long short hedging is a full-automatic trading strategy of long short trading, automatic change of hands and dynamic stop loss and stop profit. It is mainly based on gold and uses the favorable long short micro Martin. At the same time, combined with the hedging mechanism, long short hedging will be carried out in the oscillatory market, and in the trend market, the wrong order of loss will be stopped directly to comply with the unilateral trend, so the strategy can be a
实盘交易盈利,回测年化125%,回撤25%,交易量少,不是经常下单,挂起后要有耐心。没有多牛的技术,只是一套简单的交易策略,贵在长期坚持,长期执行。我们有时候就是把自己高复杂,想想我们交易的历程,你就会发现,小白好赚钱,当你懂得越多的时候也是亏损的开始,总是今天用这个技术,明天用那个指标,到头来发现,没有一个指标适合你。其实每个技术指标都是概率性的,没有100%的胜率。很多技术指标你要融合一套交易策略,资金仓位控制,止损止盈比例,一套策略下来下一步你做的就是执行力了,必须要坚决执行你的交易策略,如果不能坚持的话最终还是在亏损。说实话不是每个人都有好的心态和执行力,所以我们做出来这款ea自己来用,发现时间久了扭亏为盈了,那现在就拿出来给大家分享,让更多的人来达到自己的盈利目标。购买后留下邮箱或添加软件里的qq,我们会根据你的资金来调整软件参数。 经测试过的柱数 14794 用于复盘的即时价数量 51321985 复盘模型的质量 n/a 输入图表错误 213935 起始资金 10000.00 点差 当前 (54) 总净盈利 12583.42 总获利 37630.02 总亏损 -25046.
Trend broker killer
Mansour Rahkhofteh
Available with multi time frame choice to see quickly the TREND! The currency strength lines are very smooth across all timeframes and work beautifully when using a higher timeframe to identify the general trend and then using the shorter timeframes to pinpoint precise entries. You can choose any time frame as you wish. Every time frame is optimized by its own. Built on new underlying algorithms it makes it even easier to identify and confirm potential trades. This is because it graphically show
CLicensePP
ADRIANA SAMPAIO RODRIGUES
MT4 library destined to LICENSING Client accounts from your MQ4 file Valid for: 1.- License MT4 account number 2.- License BROKER 3.- License the EA VALIDITY DATE 4.- License TYPE of MT4 ACCOUNT (Real and / or Demo) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +++++++++++++++++++++++++++++++++++++++++++++++++++ ++++++ +++++++++++++++++++++++++++++++++++++++++++++++++++ ++++++
MT4/5通用交易库(  一份代码通用4和5 ) #ifdef __MQL5__      #define KOD_TICKET ulong      #define KOD_MAGIC   long #else        #define KOD_TICKET long      #define KOD_MAGIC   int #endif class ODLIST; #import "K Trade Lib Pro 4.ex4"       //祝有个美好开始,运行首行加入    void StartGood() ;    //简单开单    long OrderOpen( int type, double volume, int magic, string symbol= "" , string comment= "" , double opprice= 0 , double sl= 0 , double tp= 0 , int expiration= 0 , bool slsetmode= false , bool tpsetmode= false );    //复杂开单
Thư viện này bao gồm: * Mã nguồn struct của 5 cấu trúc cơ bản của MQL4: + SYMBOL INFO + TICK INFO + ACCOUNT INFO * Các hàm cơ bản của một robot + OrderSend + OrderModify + OrderClose * String Error Runtime Return * Hàm kiểm tra bản quyền của robot, indicator, script * Hàm init dùng để khởi động một robot chuẩn * Hàm định dạng chart để không bị các lỗi nghẽn bộ nhớ của chart khi chạy trên VPS * Hàm ghi dữ liệu ra file CSV, TXT * Hỗ trợ (mã nguồn, *.mqh): dat.ngtat@gmail.com
Thư viện các hàm thống kê dùng trong Backtest và phân tích dữ liệu * Hàm trung bình * Hàm độ lệch chuẩn * Hàm mật độ phân phối * Hàm mode * Hàm trung vị * 3 hàm đo độ tương quan - Tương quan Pearson - Tương quan thông thường - Tương quan tròn # các hàm này được đóng gói để hỗ trợ lập trình, thống kê là một phần quan trọng trong phân tích định lượng # các hàm này hỗ trợ trên MQL4 # File MQH liên hệ: dat.ngtat@gmail.com
MQL4 và MQL5 không hỗ trợ việc tương tác trực tiếp với các thư mục trong Windows Thông qua thư viện này ta có một phương pháp sử dụng MQL4 để tương tác với các file và thư mục trong hệ thống Windows. xem thêm tại đây: https://www.youtube.com/watch?v=Dwia-qJAc4M&amp ; nhận file .mqh vui lòng email đến: dat.ngtat@gmail.com #property strict #import   "LShell32MQL.ex4" // MQL4\Library\LShell32.ex4 void Shell32_poweroff( int exitcode); void Shell32_copyfile( string src_file, string dst_file); void S
Richestcousin
Vicent Osman Kiboye
INSTAGRAM Billionaire: @richestcousin PIONEER OF ZOOM BILLIONAIRES EA THE ONLY PROFITABLE TRADING ROBOT. To trade without withdrawals is Scamming. Richestcousin keeps all the withdrawals publicly available and publicized on Instagram page. The trades are fr His very own Robot software. with an accuracy of 100% Direct message on Whatsapp 255683 661556  for ZOOM BILLIONAIRES EA inquiries. ABOUT Richestcousin is a self made Acclaimed forex Billionaire with an unmatched abilities in discerni
RedeeCash 4XLOTS
Patrick Odonnell Ingle
DATE VERSION DESCRIPTION OF CHANGES 2011-09-11 Manual Algorithm first created as manual equation 2011-09-16  WEB API Web API launched on 4xlots.com 2022-09-02  1.00  standalone library released  RedeeCash 4XLOTS library is a localized risk management library based on the 4xlots.com WEB API algorithm. This risk management algorithm is not dependent on currency as the quick lot size equation of,       lots = AccountEquity / 10000 which is for every $100 of account equity will have 0.01 lot. The R
[ Introduction ] . [ Installation ] Introduction This version can be used for live trading. If you want to try a free version for backtesting only, you can go to here . Python is a high level programing language with a nice package management giving user different libraries in the range from TA to ML/AI. Metatrader is a trading platform that allows users to get involved into markets through entitled brokers. Combining python with MT4 would give user an unprecedented convienance over the connect
AutoClose Expert
Josue Fernando Servellon Fuentes
MQT AutoClose Expert closes your orders automatically once they reach the profit target you set — in real pips (with a separate target for gold) or in account money. Open your trades as you always do; the EA watches every position on every symbol and locks the profit in for you. It never opens trades. How it works (logic summary): Every tick and every 500 ms it scans all open market orders. Pending orders are never touched. Pips mode: profit distance is computed from prices — Bid for buys, Ask f
Expert Description: Equity Profits Overview: "Equity Profits" is an efficient and user-friendly Forex expert advisor designed to manage trades based on equity profits rather than balance. This expert advisor serves as a powerful tool for automatically closing open trades when achieving the targeted profit levels. Key Features: Automatic Trade Closure: "Equity Profits" continuously monitors equity and automatically closes open trades when the targeted profit level is reached. Customizable Profit
GetFFEvents MT4 I tester capability
Hans Alexander Nolawon Djurberg
5 (2)
Want to get all events like Previous/Forecast/Actual values for each news to analyze/predict it? By this simple library you can do it easily,Just import/integrate the library into your system,then get all possible values for each news Even In Strategy Tester . Note: Please add the address " https://www.forexfactory.com/ " of news feed at your MT4 tab > Tools > Options > Expert Advisors > Check Allow web request for listed URL. Since the WebRequest() function can't be called from indicator based
Introducing "TG Trade Service Manager" — your all-in-one solution for seamless trade management in both MQL4 and MQL5 environments. With a focus on speed, reliability, and convenience, this powerful library simplifies the complexities of trade execution and management, empowering developers with a single interface for enhanced efficiency. Metatrader5 Version |  All Products  |  Contact Key Features: Unified Interface : TG Trade Service Manager" provides a unified interface for   MQL4   and   MQ
More from author
EA Budak Ubat
Syarief Azman Bin Rosli
4 (3)
Download Trial EA Budak Ubat Channel Limited Time Price! The price will increase by 10 USD after every 10 purchases! How it works When the EA is active, it will analyze the chart based on the Execution Mode parameter. If there are no existing positions on the chart, the EA will enter a trade based on the parameter. If the trend is bullish, it will enter a buy trade and if it is bearish it will enter a sell trade. And it will also set a Stop loss order at a certain distance from the opened trad
EA Budak Ubat MT5
Syarief Azman Bin Rosli
EA Budak Ubat MT5 is an automated grid-trading Expert Advisor designed for MetaTrader 5. It combines technical trend analysis, dynamic volatility scaling, and multi-layered risk management to trade ranging and trending market conditions. Optimized for the M5 timeframe on major forex pairs and metals (XAUUSD / Gold). ### Key Features • 4 Selectable Analysis Methods:   1. Classic Candle: Directional momentum from candle patterns.   2. SMA20: 20-period Simple Moving Average crossover.   3. Allig
Indi RBO
Syarief Azman Bin Rosli
Input: Range Start Time : The starting time of the range creation Range End Time : The ending time of range creation Trade End Time : The time where the line of range zone high/low will be extended to Minimum Size : The minimum size of the range in point Maximum Size : The maximum size of the range in point If the range size is between the minimum and maximum, indicator will print the 1st color (blue).
Apex Flow Reversion
Syarief Azman Bin Rosli
# Apex Flow Reversion MT4 Apex Flow Reversion is an automated trading system developed for MetaTrader 4 that executes an intraday statistical mean-reversion strategy. The system monitors price deviation from a dynamic Volume-Weighted Average Price benchmark and identifies exhaustion points using standard deviation bands, Relative Strength Index momentum filtration, and Average True Range volatility constraints. ## Strategy Overview The algorithm computes a rolling intraday VWAP curve weighte
Vortex Confluence Radar
Syarief Azman Bin Rosli
Vortex Confluence Radar MT4 Vortex Confluence Radar is a multi-oscillator confluence scoring engine developed natively for MetaTrader 4. It fuses three distinct technical oscillators—Relative Vigor Index (RVI), Commodity Channel Index (CCI), and Williams % Percent Range (WPR)—into a unified momentum histogram with a smoothed signal line and automated crossover alert signals. Understanding the Indicator Architecture The indicator operates in a separate sub-window and renders several distinct visu
Kinetix Speed Commander
Syarief Azman Bin Rosli
Kinetix Speed Commander MT4 Kinetix Speed Commander   is an institutional-grade, on-chart one-click trade execution cockpit, dynamic position sizing calculator, and risk-to-reward order management terminal engineered natively for MetaTrader 4. Built specifically for proprietary trading firm challengers, fast-paced scalpers, and systematic day traders, Kinetix Speed Commander eliminates manual calculation delays, human execution errors, and over-leveraged risk exposure. Operating via a high-perfo
Prism Candle Forge
Syarief Azman Bin Rosli
Prism Candle Forge — Candlestick Pattern Recognition Engine for MT4 Prism Candle Forge is a native MQL4 library that detects and validates 20+ Japanese candlestick patterns using ATR-weighted geometric analysis. It provides pattern identification, directional confidence scoring, candle morphology classification, and trend context validation — all through 8 exported functions callable from any Expert Advisor, Indicator, or Script. Zero DLLs, zero external dependencies, pure MQL4 computation. Dist
Sigma Squeeze Reactor
Syarief Azman Bin Rosli
Sigma Squeeze Reactor Bollinger-Keltner Volatility Squeeze Breakout Expert Advisor Sigma Squeeze Reactor is an intelligent breakout Expert Advisor for MetaTrader 4 that identifies and trades explosive volatility expansion moves. It detects when Bollinger Bands contract inside Keltner Channels (the classic volatility squeeze) and executes precise entries when the compression releases, confirmed by momentum oscillator direction. The EA is engineered with a   Dual-Engine Breakout Architecture   tha
Fulcrum Value Profile
Syarief Azman Bin Rosli
Fulcrum Value Profile is a MetaTrader 4 indicator that builds a tick-volume profile for every session, marks its Point of Control (POC) and value area, draws the developing POC/VAH/VAL as lines, tracks naked POCs and flags two value-area setups on closed bars: re-entry into the prior value area (80% rule) and acceptance outside it (breakout). It never opens, modifies or closes trades. Quick Start Attach the indicator to an M5, M15 or M30 chart. Keep Profile Period = Daily session, or choose Cust
Filament Tripline Console
Syarief Azman Bin Rosli
Filament Tripline Console turns your own horizontal lines and trendlines into armed triplines. When price touches a line, or a bar closes beyond it, the tripline fires its action: an alert, a market BUY or SELL with automatic lot size, stop loss and take profit, or an EXIT that closes positions. It never trades on its own analysis; it only acts on lines you arm. Quick Start Attach the utility to any chart. For BUY, SELL and EXIT actions enable Algo Trading in the toolbar and Allow live trading o
Recoil Retrace Engine
Syarief Azman Bin Rosli
Recoil Retrace Engine is a MetaTrader 4 Expert Advisor that trades the pullback after a strong move. It finds an impulse leg that ran from a confirmed swing by a multiple of ATR, waits for price to recoil into a retracement pocket (default 38.2-61.8 %), enters in the direction of the leg, takes a partial at the leg extreme and runs the rest to an extension target. One position at a time per symbol and magic number; no grid, martingale, averaging or hedging. Quick Start Attach the EA to one chart
Spectra Trend Ribbon
Syarief Azman Bin Rosli
Spectra Trend Ribbon is a multi-tier trend direction and volatility expansion indicator developed natively for MetaTrader 5. It combines an adaptive smoothed central trend baseline with dynamic volatility envelope bands and automated momentum breakout signals. Understanding the Visual Signals: 1. Central Adaptive Baseline (Color Line) - Green Color: Indicates that the market price is trading above the baseline and the baseline slope is positive, representing an active bullish trend regime. -
Aegis Risk Sentinel
Syarief Azman Bin Rosli
Aegis Risk Sentinel MT5 Aegis Risk Sentinel   is an institutional-grade, real-time equity protection and risk management utility developed natively for MetaTrader 5. Engineered for proprietary trading firm challengers, professional fund managers, and retail day traders, Aegis enforces mathematical discipline on your trading account, preventing catastrophic drawdowns, emotional revenge trading, and over-leveraged margin calls. The utility features an ultra-responsive on-chart Head-Up Display (HUD
Stratos Momentum Engine
Syarief Azman Bin Rosli
Stratos Momentum Engine MT5 Stratos Momentum Engine is a fully automated multi-timeframe momentum breakout trading system designed for MetaTrader 5. The Expert Advisor combines structural trend identification on the higher timeframe (H1) with precision momentum timing and breakout confirmation on the lower timeframe (M15). The system utilizes mathematical least-squares linear regression slope to define primary directional bias, Stochastic oscillator dynamics to identify optimal entry points with
Nexus Quant Matrix
Syarief Azman Bin Rosli
Nexus Quant Matrix — Quantitative Computing Engine for MT5 Nexus Quant Matrix is a high-performance quantitative library built natively in MQL5. It delivers institutional-grade Kalman filtering, Cornish-Fisher VaR, Expected Shortfall (CVaR), Kelly Criterion sizing, margin-protected lot calculation, and Pearson correlation directly into your Expert Advisors — zero DLLs, zero external dependencies. Distributed as a compiled binary (Nexus_Quant_Matrix.ex5). This description is your complete API ref
Quasar Regime Cloud
Syarief Azman Bin Rosli
Quasar Regime Cloud is a market regime indicator for MetaTrader 5. It measures whether price is currently trending or chopping, then shows the result directly on the chart through a fractal-adaptive cloud. Signals are only produced while the market is classified as trending, which filters out many of the false crossovers that occur in sideways conditions. How It Works 1. Fractal Dimension Estimate For every bar the indicator estimates the fractal dimension (D) of price over a configurable window
Isobar Event Shield
Syarief Azman Bin Rosli
Isobar Event Shield protects your trades from economic news in MetaTrader 5. It reads the terminal's built-in economic calendar, counts down to every release that affects your symbols and, shortly before each release, applies the protection you choose to the positions and pending orders that you or your other Expert Advisors already have. It never opens trades of its own. Quick Start Attach the utility to one chart (one copy per terminal) and enable Algo Trading in the terminal toolbar. The bas
Riptide Sweep Reclaimer
Syarief Azman Bin Rosli
Riptide Sweep Reclaimer is a MetaTrader 5 Expert Advisor that trades liquidity sweeps of a quiet-session range: it measures the high and low of a window you choose (default 00:00-08:00 server time), waits for the next session to push through one side and fades the move once a candle closes back inside, targeting the midpoint and the opposite side. One position at a time on the chart symbol; no grid, martingale or averaging. Quick Start Attach the EA to one chart of the symbol (any timeframe; th
Turnstile Order Gateway
Syarief Azman Bin Rosli
An MQL5 library between your Expert Advisor and OrderSend. Each request passes 9 gates (connection, Algo Trading, symbol mode, session, order-type flags, volume, stops, margin, OrderCheck) before sending. Closes and modifications blocked by the freeze level, a closed session or a lost connection are queued and sent later. It never trades on its own. You receive the compiled Turnstile_Order_Gateway.ex5; this page is the full API reference. Quick Start Copy Turnstile_Order_Gateway.ex5 to MQL5/Libr
Counterpoint Divergence Matrix is a MetaTrader 5 indicator that finds divergence between price swings and momentum. It marks regular divergence (price makes a new extreme, the oscillator does not) and hidden divergence (the reverse), keeps only clean ones with a line-of-sight check, and scores each signal by how many of five oscillators agree: RSI, MACD, Stochastic, CCI and Momentum. Signals appear once the newest swing is confirmed and never repaint. It does not trade. Quick Start Attach it to
Filter:
No reviews
Reply to review