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: Position Management: Scaling Into Winners With A Falling-Risk Pyramid.
We introduce CPyramidBridge, a thin MQL5 layer that maps bet-sizing results to CPyramidEngine. The bridge applies probability to initial lot sizing, enforces a capacity-aware entry gate, promotes add-ons from dynamic divergence, adapts the trailing stop to reserve estimates, and syncs signals on close, allowing an Expert Advisor to convert model confidence and concurrency into a structured, decreasing-risk pyramid.
Before we begin, note the prerequisites. The code in this article depends on all five files from Part 13 (BetSizingUtils.mqh, EF3M.mqh, Ch10Snippets.mqh, BetSizing.mqh, BetSizingEA.mq5) and on the three files from the pyramiding article (PyramidUtils.mqh, PyramidEngine.mqh, PyramidEA.mq5). This article adds two new files: PyramidEngine_additions.mqh, which extends the engine with seven new public methods, and BetSizingPyramidBridge.mqh, which implements CPyramidBridge. A wired demonstration EA, BetSizingPyramidEA.mq5, shows all five integration points active at once. All three new files are in the attached archive.
Figure 1 illustrates pyramiding. Decreasing lot sizes entered at higher price levels form a triangular outline. Because the unified stop advances after each add-on, total dollar risk falls at each stage even as the total position size increases.
Author: Patrick Murimi Njoroge