Discussing the article: "Graph Theory: Network Flow of Commodities (Ford-Fulkerson Algorithm), Used as a Liquidity-Capacity Engine"
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Check out the new article: Graph Theory: Network Flow of Commodities (Ford-Fulkerson Algorithm), Used as a Liquidity-Capacity Engine.
The article presents an MQL5 Expert Advisor that adapts the Ford–Fulkerson max-flow method into a liquidity-capacity filter. Market structures—Swing Highs/Lows, Fair Value Gaps, Order Blocks, and Liquidity Pools—form a directed graph with edge capacities from volume, price reaction, distance, and structure quality. Maximum flow qualifies ICT setups, filters weak paths, and drives dynamic position sizing for a consistent, two-stage decision process.
The system is built in layers, and each layer has a specific job. The first layer scans the chart and detects market structure—Swing Highs, Swing Lows, Fair Value Gaps, Order Blocks, and Liquidity Pools. These are not drawn for visual purposes. They are converted into nodes inside a directed graph. The second layer builds the connections between those nodes and assigns each connection a capacity score. That score is calculated from four factors: tick volume, the strength of prior price reactions, the distance of the move, and the quality of the structure type. Liquidity Pools score the highest. Order Blocks follow. Fair Value Gaps and Swings fill out the rest. Once the graph is built, the Ford-Fulkerson engine runs through it and returns a single number—the maximum flow from the current price to the nearest target liquidity pool.
The system never trades on flow alone. Direction comes first. Price must be sitting inside a Fair Value Gap or respecting an Order Block, and a liquidity pool must exist on the other side of the move to draw price toward it. Only once those ICT conditions are met does the flow number become relevant. If the maximum flow clears the threshold, the trade is qualified and sizing is applied dynamically—stronger flow produces larger position size, weaker flow produces smaller size. If the flow falls short, or if a bottleneck is detected anywhere along the path, the trade is skipped entirely.
Author: Hlomohang John Borotho