Agent CIPHER
- Experts
- Version: 20.4
- Updated: 11 April 2026
https://www.youtube.com/channel/UCkjtuoH43m0QOTLgDWu1pFg
https://discord.gg/5yhEyGgkqc
--- AGENT CIPHER ---
Position Management System for MT5
Short Summary
Agent CIPHER is a post-entry position management engine. It takes a position — any position — and manages it to the end. The entry is you. The management is it.
Subjected to a torture test on 30,777 trades with entries having zero statistical edge (simple EMA crossovers), replicated across 7 major pairs over more than 5 years, CIPHER has proven it is a constant.
The engine does not drift. Does not degenerate. Does not collapse. It produces the same behavior on every market with only 0.017% variation between 7 pairs across over 164,000 cumulative trades.
• Automatic position adoption — CIPHER can pick up and manage a position opened by ANOTHER EA. Combine your favorite signal EAs with this management system.
• 5 trading modes — Hyper-Scalping, Scalping, Intraday, Daily, Swing. Always perfectly proportional to the market, suited to all timeframes.
• Non-linear trailing SL — Asymmetric ratios that capture the real amplitude of movements.
• Dynamic TP — Detects and locks each favorable price oscillation before it fades.
• Multi-layer market reading — Real-time visualization of high-probability reversal zones.
• Prop Firms compatibility — Multiple features to comply with all restrictions while maximizing aggressiveness.
• On-the-fly reconfiguration — Nothing is fixed, everything is mobile, even mid-trade.
This document details the entire system and its logic.
═══════════════════════════════════════════════════════════════
Philosophy
You are looking at the final development phase of a very high-potential position management system. Born from thousands of hours of live trading and algorithmic engineering, Agent CIPHER transforms every trade into a surgical operation where nothing is left to chance.
Once you launch it, you will never be able to part with it. This EA was designed to automate the mental gymnastics a trader performs throughout their trading day. This system is based on conceptual common sense and an enlightened vision of the market. This is not just another EA but rather an open door to a new vision of the market.
This market is so ruthless that it leaves no room for mistakes and emotions. Only iron discipline and a deep understanding of the market will make you a profitable trader. This code, as simple as it may seem, is actually a multi-level mental matrix representing the past footprint of the market and its effects on the present.
You will instantly understand from the first loading of this EA on your chart that all the proposed levels are always perfectly coherent. This is no coincidence, trading is not gambling, movements are not random but the representation of hundreds of thousands of positions managed by institutional algorithms performing thousands of calculations per second.
For us small fish, we must settle for what the market has to offer. This EA was specially designed for this purpose to identify and exploit imbalances with a high probability of return. You will immediately move to a higher level with this code.
The goal is to look for the right price patterns, you can spot your consolidation zone materializing with the visualization of the red and green lines. Identify the extent of your imbalance with the white lines, the global market range on higher timeframes thanks to the light blue lines. Understand market tensions to ride the wave without intervention. Apply the right mode proportional to this movement, the right trailing SL proportional to this movement and mathematics will play in your favor. This EA is compatible with all trading styles and all strategies!
═══════════════════════════════════════════════════════════════
Open a Position
A draggable yellow line represents your future Stop Loss. Move it by double-clicking on it (a small square appears on the right side of the line) then click again and hold to move the SL line wherever you want.
Direction detection is automatic: SL below price = LONG / SL above price = SHORT
Before clicking, the EA displays in real time:
• Risk/reward ratio (e.g.: 1/2.35)
• Estimated risk in currency (e.g.: ~50.00 USD)
• Current SL and TP update threshold in % of price movement
Click on EXECUTE TRADE:
• Automatic lot calculation to risk exactly the defined %
• Opening with SL and TP positioned
• Initial TP = white line corresponding to the direction
═══════════════════════════════════════════════════════════════
Principle — Chart Reading
The EA analyzes the market in real time via a proprietary algorithm and displays high-probability reversal zones directly on your chart:
• Red and green lines: The space between these two lines represents the overall state of the price on your signal timeframes. Concretely, the closer these two lines get to each other, the more the compression is accompanied and reliable.
• White lines: Dynamic profit targets, constantly recalculated. This is where your final TP will be placed. They represent your long and short equilibrium points. The further your equilibrium points are from the price, the stronger your compression, the better!
• Light blue lines: Global range zone. They serve to relate the volatility state of your higher TFs to your levels calculated by Agent CIPHER. Concretely, the closer your blue lines are to the white lines in one direction or another, the more we can deduce that the movement is in general excess → possible reversal (the TP can also be placed on the blue line).
• Purple line: The ASK price giving the SPREAD in real time (instant visualization on loading so you don't get caught by it).
═══════════════════════════════════════════════════════════════
The 5 Trading Modes
HYPER-SCALPING / SCALPING / INTRADAY / DAILY / SWING
Each of these modes represents the overall amplitude of the market according to your trading horizon. The algorithm dissects and analyzes every granularity of the market through multiple simultaneous layers of reading. Each mode automatically adjusts the depth and resolution of this analysis to perfectly match your horizon — from micro-movements of a few seconds to swings spanning several weeks. The goal is to always manage the position with perfect proportion according to price movements and your objectives.
You can switch from one mode to another at any time. For example, enter in Scalping mode then switch to Intra mode if you judge that the movement will have more amplitude than expected. These 5 modes are there to ensure perfect coherence between the overall state of the market and your objectives. They are there to simply take what the market has to offer you, no more overly ambitious objectives!
The Hyper-Scalping mode pushes this logic to the extreme: the system reaches for information where MT5 does not go natively, exploiting granularity levels inaccessible to conventional indicators. But the principle remains identical across all 5 modes — only the depth of field changes.
Recommended signal timeframes: 1m for Hyper-Scalping and Scalping, 5m for Intraday, 15m for Daily and 1H for Swing.
These TFs will be your references for the trailing activation delay. Concretely, if you activate a delay in number of bars via the parameter, the system will take these timeframes as reference depending on the currently activated mode. Example: if you set 5 bars in Intraday mode, the system will wait for 5 5m candles to close before activating the trailing SL.
═══════════════════════════════════════════════════════════════
Trailing Stop
--- Adaptive Behavior ---
The trailing SL follows a non-linear and intelligent behavior. It uses asymmetric evolving ratios to mathematically increase the probabilities of success and exploitation of price movements. Concretely, it better captures the entirety of price movements and better covers gains.
This trailing SL has 5 types of reactivity settings, each setting will have a different behavior, depending on the distance between price-SL and the trading mode used. Its 5 settings allow for ultra-aggressive scalping as well as swing trading over several weeks! You simply need to select the desired mode.
1 Instant — Immediate reaction, ultra-aggressive scalping
3 Fast — Reactive, scalping/short intraday
7 Moderate — Balanced, standard intraday (default)
15 Slow — Smoothed, daily / short swing
31 Very Slow — Maximum smoothing, long-term swing
⚠ It is strongly recommended to use Demo before going live!
--- Safeties ---
• Anti-return: the SL can never move back, only forward (unless manually modified)
• Update threshold: in % of price, avoids too frequent modifications (adjustable)
• Activation delay: wait X bars before trailing starts
• Automatic restoration: if the SL is manually deleted
═══════════════════════════════════════════════════════════════
Dynamic Take Profit (Dynamic TP)
The system that changes everything.
The Dynamic TP detects in real time the micro-reversals of price during your trade and automatically closes fractions of your position at each favorable wave. No fixed levels, no arbitrary timing — the system reads price momentum and acts surgically when the movement fades.
What it concretely changes:
• Each price oscillation in your favor is captured and locked — it can no longer be lost even if price comes back
• The remaining volume continues running toward the final TP with the trailing SL protecting it
• The longer the trade lasts, the more accumulated gain increases — regardless of the final exit point
• The system automatically adapts to volatility and trailing SL speed
In practice: you open your position, the Dynamic TP works silently at each candle. At the end of the trade, you discover in the logs a complete summary: number of interventions, secured volume, weighted average price and total gain in R. A horizontal blue line appears on the chart showing your real average exit price.
Two key parameters:
1. Dynamic TP Intensity — Three modes:
LOW - Swing — Releases volume slowly, spaced shots, lets big movements breathe.
NORMAL - Versatile — Balance between capture and patience, suited to the majority of configurations.
HIGH - Scalping — Releases volume quickly and aggressively, captures each micro-oscillation.
2. Volume Reserve — the percentage of volume to reserve for the final exit (30% by default). You can also set 0.10 to reserve 10% of volume for the trailing SL/TP and thus let the entire system manage the position volume. The best results have been obtained this way. However, you must adjust this parameter according to the quality of your strategy. The more performant your strategy, the more volume you can reserve for the final exit. The rest of the system is entirely automatic.
═══════════════════════════════════════════════════════════════
CIPHER IS A CONSTANT — The Torture Test
To measure the resistance of the management engine, CIPHER was subjected to the most brutal test possible: connected to simple exponential moving average crossovers (EMA 9/21) — entries that predict nothing and have zero statistical edge — with total free rein. No drawdown limiter. No hour or action limiter. 100% of capital. 1% risk per trade.
The question was simple: how long would CIPHER hold before ruin?
--- Results on EURUSD ---
Conditions: EURUSD, capital $10,000, risk 1%, Intraday 5min mode, SL smoothing 7, Dynamic TP High, volume reserve 10%. Start: January 1st, 2021.
Survival duration .............. 5 years, 3 months and 18 days
Total number of trades ......... 30,777
Win Rate ....................... 81.62%
Profit Factor .................. 0.92
Linear correlation ............. -0.94 (near-perfect straight line)
GHPR (geo growth/trade) ........ 0.9998
Net real cost per trade ........ 0.02% of current capital
The correlation at -0.94 means the equity curve descends in a straight line, from the first to the last trade. A system that derails produces a chaotic curve. CIPHER loses in a straight line. It keeps control. The GHPR at 0.9998 means each trade only consumed 0.02% of current capital — the system was mechanically braking its own destruction.
--- Replication across 7 major pairs ---
The exact same protocol was replicated on six other pairs. The only thing that changes — is the symbol.
EURUSD : Spread 5.1 | PF 0.92 | WR 81.62% | Corr -0.94 | 30,777 trades | GHPR 0.9998
GBPUSD : Spread 7.3 | PF 0.79 | WR 81.18% | Corr -0.81 | 26,542 trades | GHPR 0.9997
USDCHF : Spread 7.3 | PF 0.69 | WR 76.25% | Corr -0.83 | 15,093 trades | GHPR 0.9994
USDJPY : Spread 5.9 | PF 0.84 | WR 80.52% | Corr -0.83 | 27,900 trades | GHPR 0.9997
AUDUSD : Spread 6.7 | PF 0.86 | WR 80.38% | Corr -0.81 | 26,034 trades | GHPR 0.9996
NZDUSD : Spread 8.1 | PF 0.80 | WR 77.34% | Corr -0.87 | 13,766 trades | GHPR 0.9993
USDCAD : Spread 6.5 | PF 0.85 | WR 80.13% | Corr -0.84 | 24,634 trades | GHPR 0.9996
The key finding: The Profit Factor varies because the spread varies — it's a market tax. But the GHPR — the purest measure of what CIPHER does to each position — varies by only 0.017% between the best and worst. Seven pairs. Seven different spreads. Seven markets. Same engine. Same result.
On each pair, wins come in series of 7 to 9. Losses in series of 2. This ratio does not change. Whether on EURUSD, NZDUSD or USDCHF. Seven markets. Same structure. Same breathing. Same signature.
--- What this proves ---
CIPHER is a constant. The engine produces the same result on every market, every pair, every condition. It has been tested across more than 164,000 cumulative trades and its management depends neither on the market, nor on the pair, nor on the quality of the entry. The engine does its job — every time, in the same way.
The tipping point toward breakeven has been measured precisely: the average gain per trade needs to go from $4.76 to $5.16, an improvement of 8.4% on average gains. This means the management engine alone, with zero entry advantage, performs 91.6% of the necessary work. The engine is validated. The engine is stable.
Backtest results do not guarantee future performance. CIPHER is a position management tool — profitability depends on the quality of your entries.
═══════════════════════════════════════════════════════════════
Trailing Take Profit
• The TP follows the white line constantly (unless manually modified)
• Price goes in your direction → TP moves away (more potential)
• Price goes against you or compresses → TP gets closer (secures)
• Update threshold in % of price configurable on the same parameter as the SL
• Mobile TP activatable/deactivatable independently of trailing SL
═══════════════════════════════════════════════════════════════
Partial Take Profits
3 independent levels:
• TP1: 25% of the way Entry → Final TP
• TP2: 50% of the way
• TP3: 75% of the way
For each level: on/off activation and percentage of volume to close.
Behavior:
• Visualization by purple lines on the chart
• Automatic closing when price reaches a level
• Each level triggered only once (no double execution)
• If the final TP moves (trailing), partial levels are recalculated
• It is possible to activate any TP at any time. You can therefore take a position without TP and let it run, then activate at a strategic moment a partial TP that would have already been taken if activated before. At that moment the TP will be taken at market according to the current price level.
═══════════════════════════════════════════════════════════════
Combining Both Take Profit Systems
Classic partial TPs (TP1/TP2/TP3) and Dynamic TP are fully compatible and can operate simultaneously. Both systems can be activated and deactivated independently at any time, including during an open trade.
When both are active, the system automatically coordinates volume: the Dynamic TP reserves its portion of volume for the final exit and works on the remainder in parallel with partial levels. The total volume distributed between classic partial TPs and Dynamic TP is verified at opening to avoid any over-allocation.
═══════════════════════════════════════════════════════════════
Automatic Position Adoption (including from other EAs)
The EA can receive buy and sell signals from another EA then take control of the position by managing the SL and TP tracking! For this, your EA must position its SL at the desired point itself, the TP can be sent at any distance and will be captured by AGENT CIPHER.
What happens:
• Detection of existing position on the symbol
• Retrieval of all data (entry, SL, TP, volume, direction, ticket)
• Recalculation of trailing parameters
• Saving the ticket to avoid duplicates
• Immediate resumption of management
Deferred adoption: If a position exists but does not yet have an SL, the EA waits. As soon as an SL is detected, adoption is triggered.
═══════════════════════════════════════════════════════════════
Advanced Features
--- Actions Limiter (Prop Firms) ---
Designed to comply with position modification rules at prop firms (FTMO imposes 2000 actions max per day). Counting of all actions (openings, closings, SL/TP modifications). Counter per EA/symbol + global counter. Persistent between MT5 restarts (GlobalVariables). Automatic reset at midnight.
0-85% NORMAL Everything works
85-100% SL ONLY Trailing SL active, TP frozen
100% FROZEN SL and TP frozen
Advice: Ask your broker/propfirm if a daily action limit is imposed. You can also play with the SL/TP Update refresh parameter in % to decrease the update frequency.
═══════════════════════════════════════════════════════════════
Manual Modifications
You modify the SL (via MT5):
• The EA detects the change
• Complete recalibration from this new reference point
• The delay counter (bars) restarts at zero
• Trailing continues normally
You modify the TP (via MT5):
• The EA detects the change
• It respects your decision and stops modifying the TP
• Automatic control resumes: the EA takes back control of the TP when the white line crosses the TP or when the distance between the TP and the white line becomes less than 4 pixels on screen. This condition is independent of the Update threshold in % — it is purely visual and automatically adapts to your chart zoom level.
Tip: You can also manually put the actual TP back on the white line after moving it, the EA will resume control! (detailed informative log in the "EXPERTS" tab in MT5)
═══════════════════════════════════════════════════════════════
Information Displayed During Trade
Line 1 — Actions & Hours
Actions counter for this EA (this symbol) • Global actions counter (all EAs, all symbols) • Final configured action limit • Configurable trading time range
Line 2 — Ratio / Risk / Gain
Current R:R ratio (updates because SL moves with trailing) • Actual risk in currency (loss if SL hit) • Potential gain in currency (profit if TP hit)
Line 3 — Daily Drawdown
Current DD (+ if gain, - if loss) • Configured DD limit (reset at 00:00) • Reference balance of the day • [LIMIT REACHED] indicator if threshold reached
Each line is individually activatable/deactivatable. Buttons and lines are movable to any location on the chart.
═══════════════════════════════════════════════════════════════
Capital Protections
--- Daily Drawdown Protection ---
DD% = ((Start of day Balance - Current Equity) / Start of day Balance) × 100
• At midnight (broker time), the EA records the balance as reference
• If the % exceeds the limit during the day → new trades blocked
• Existing positions continue to be managed
• Automatic reset every day at midnight
• Parameter modifiable at any time
--- Intelligent Margin Protection System ---
AGENT CIPHER integrates an automatic protection system that watches over your capital in real time. Before each position opening, the EA verifies that your account has the optimal conditions to take the trade. If available margin is insufficient, the button briefly displays "MARGIN PROTECT" and the entry is refused.
The Risk_Percent parameter you configure defines the size of each position based on your capital. This calculation naturally creates a safety threshold. No additional setting is needed: the protection automatically adapts to your account size, the traded instrument and your broker's leverage.
--- Trading Hours ---
• Configurable range (HH:MM-HH:MM format, broker time)
• Outside range: EXECUTE button grayed out, opening impossible
• If a position is opened during allowed hours, at the minute when the end time is reached the position will be closed
• The system is 24/7 by default
--- SAFETY ONTICK Security ---
The code contains a safety that immediately closes at market if the price exceeds SL/TP without execution → GUARANTEED MARKET EXIT ON ALL BROKERS → no SL slippage!
--- Visual SL History ---
• Each SL movement is traced as a segment on the chart
• Color according to direction: green (LONG) / red (SHORT)
• Keeping the last 50 trades
• Automatic cleaning of oldest ones
• Allows visual analysis of your trade management
--- Real-time ASK Line ---
Purple line that follows the ASK price tick by tick. Visualizes the spread constantly. SPREAD = the DIFFERENCE between ASK and BID.
--- Multi-symbols ---
Launch multiple EAs on multiple symbols with a shared global counter.
═══════════════════════════════════════════════════════════════
Technical Compatibility
Lot calculation:
• Universal TickValue/TickSize method
• Works on all instruments: Forex, indices, metals, crypto, stock CFDs
• Risks exactly the defined %, regardless of the symbol
• Automatic respect of broker constraints (min, max, step lot)
Synchronization and reliability:
• Permanent cache/server reconciliation
• Automatic detection if the position is closed outside the EA
• Clean reset of all variables in this case
• Systematic validation before each trading action
• Complete descriptive logs on the overall state of the EA and position management
Parameter change detection:
The EA detects in real time if you modify parameters. It applies them instantly or on the next tick depending on the type. No need to remove and put the EA back: changes are applied on the fly.
═══════════════════════════════════════════════════════════════
Visual Backtest Mode
You can run the visual Backtest mode on MT5. The system automatically places trades based on a simple EMA crossover. It is only used to visualize and absorb the behavior of the system according to different possible parameters and market evolution. In live, only you can place trades by pressing the button!
═══════════════════════════════════════════════════════════════
What You Can Do
• Adjust the SL above or below the price before entering and see the ratio/risk change in real time
• Modify the SL during the trade → the EA recalibrates everything
• Modify the TP during the trade → the EA respects your choice and adapts the trailing SL
• Put the TP back on the white line → the EA resumes control of the TP
• Play between putting the TP on the white line, on the blue line or manual mode on the chart
• Adjust the trailing SL smoothing according to volatility at any time
• Configure a delay timer in bars before trailing SL activation
• Combine classic partial TPs + Dynamic TP + trailing to progressively secure
• Activate or deactivate each TP system independently at any time, including during an open trade
• Launch multiple EAs on multiple symbols with global counter
• Customize position and size of buttons
• Adjust the thickness of graphic lines
═══════════════════════════════════════════════════════════════
Quick Reference — Button States
Green EXECUTE TRADE Ready to open
Blue MARGIN PROTECT Insufficient margin (3 sec)
Gray IN POSITION Trade in progress
Gray OUT OF HOURS Outside time range
Orange DD LIMIT! Daily drawdown reached
Orange SL/TP FROZEN Actions > 100%
Gold SL ONLY MODE Actions 85-100%
⚡ CLOSE Button: Instantly cuts the position if pressed.
═══════════════════════════════════════════════════════════════
My YouTube Channel
Find tutorials and demonstrations on my channel:
https://www.youtube.com/channel/UCkjtuoH43m0QOTLgDWu1pFg
═══════════════════════════════════════════════════════════════
⚠ Warning: Trading on financial markets carries significant risks of capital loss. Past performance does not predict future performance. Agent CIPHER is a position management tool and does not constitute investment advice or a guarantee of results. Only trade with funds you can afford to lose.
https://discord.gg/5yhEyGgkqc
--- AGENT CIPHER ---
Position Management System for MT5
Short Summary
Agent CIPHER is a post-entry position management engine. It takes a position — any position — and manages it to the end. The entry is you. The management is it.
Subjected to a torture test on 30,777 trades with entries having zero statistical edge (simple EMA crossovers), replicated across 7 major pairs over more than 5 years, CIPHER has proven it is a constant.
The engine does not drift. Does not degenerate. Does not collapse. It produces the same behavior on every market with only 0.017% variation between 7 pairs across over 164,000 cumulative trades.
• Automatic position adoption — CIPHER can pick up and manage a position opened by ANOTHER EA. Combine your favorite signal EAs with this management system.
• 5 trading modes — Hyper-Scalping, Scalping, Intraday, Daily, Swing. Always perfectly proportional to the market, suited to all timeframes.
• Non-linear trailing SL — Asymmetric ratios that capture the real amplitude of movements.
• Dynamic TP — Detects and locks each favorable price oscillation before it fades.
• Multi-layer market reading — Real-time visualization of high-probability reversal zones.
• Prop Firms compatibility — Multiple features to comply with all restrictions while maximizing aggressiveness.
• On-the-fly reconfiguration — Nothing is fixed, everything is mobile, even mid-trade.
This document details the entire system and its logic.
═══════════════════════════════════════════════════════════════
Philosophy
You are looking at the final development phase of a very high-potential position management system. Born from thousands of hours of live trading and algorithmic engineering, Agent CIPHER transforms every trade into a surgical operation where nothing is left to chance.
Once you launch it, you will never be able to part with it. This EA was designed to automate the mental gymnastics a trader performs throughout their trading day. This system is based on conceptual common sense and an enlightened vision of the market. This is not just another EA but rather an open door to a new vision of the market.
This market is so ruthless that it leaves no room for mistakes and emotions. Only iron discipline and a deep understanding of the market will make you a profitable trader. This code, as simple as it may seem, is actually a multi-level mental matrix representing the past footprint of the market and its effects on the present.
You will instantly understand from the first loading of this EA on your chart that all the proposed levels are always perfectly coherent. This is no coincidence, trading is not gambling, movements are not random but the representation of hundreds of thousands of positions managed by institutional algorithms performing thousands of calculations per second.
For us small fish, we must settle for what the market has to offer. This EA was specially designed for this purpose to identify and exploit imbalances with a high probability of return. You will immediately move to a higher level with this code.
The goal is to look for the right price patterns, you can spot your consolidation zone materializing with the visualization of the red and green lines. Identify the extent of your imbalance with the white lines, the global market range on higher timeframes thanks to the light blue lines. Understand market tensions to ride the wave without intervention. Apply the right mode proportional to this movement, the right trailing SL proportional to this movement and mathematics will play in your favor. This EA is compatible with all trading styles and all strategies!
═══════════════════════════════════════════════════════════════
Open a Position
A draggable yellow line represents your future Stop Loss. Move it by double-clicking on it (a small square appears on the right side of the line) then click again and hold to move the SL line wherever you want.
Direction detection is automatic: SL below price = LONG / SL above price = SHORT
Before clicking, the EA displays in real time:
• Risk/reward ratio (e.g.: 1/2.35)
• Estimated risk in currency (e.g.: ~50.00 USD)
• Current SL and TP update threshold in % of price movement
Click on EXECUTE TRADE:
• Automatic lot calculation to risk exactly the defined %
• Opening with SL and TP positioned
• Initial TP = white line corresponding to the direction
═══════════════════════════════════════════════════════════════
Principle — Chart Reading
The EA analyzes the market in real time via a proprietary algorithm and displays high-probability reversal zones directly on your chart:
• Red and green lines: The space between these two lines represents the overall state of the price on your signal timeframes. Concretely, the closer these two lines get to each other, the more the compression is accompanied and reliable.
• White lines: Dynamic profit targets, constantly recalculated. This is where your final TP will be placed. They represent your long and short equilibrium points. The further your equilibrium points are from the price, the stronger your compression, the better!
• Light blue lines: Global range zone. They serve to relate the volatility state of your higher TFs to your levels calculated by Agent CIPHER. Concretely, the closer your blue lines are to the white lines in one direction or another, the more we can deduce that the movement is in general excess → possible reversal (the TP can also be placed on the blue line).
• Purple line: The ASK price giving the SPREAD in real time (instant visualization on loading so you don't get caught by it).
═══════════════════════════════════════════════════════════════
The 5 Trading Modes
HYPER-SCALPING / SCALPING / INTRADAY / DAILY / SWING
Each of these modes represents the overall amplitude of the market according to your trading horizon. The algorithm dissects and analyzes every granularity of the market through multiple simultaneous layers of reading. Each mode automatically adjusts the depth and resolution of this analysis to perfectly match your horizon — from micro-movements of a few seconds to swings spanning several weeks. The goal is to always manage the position with perfect proportion according to price movements and your objectives.
You can switch from one mode to another at any time. For example, enter in Scalping mode then switch to Intra mode if you judge that the movement will have more amplitude than expected. These 5 modes are there to ensure perfect coherence between the overall state of the market and your objectives. They are there to simply take what the market has to offer you, no more overly ambitious objectives!
The Hyper-Scalping mode pushes this logic to the extreme: the system reaches for information where MT5 does not go natively, exploiting granularity levels inaccessible to conventional indicators. But the principle remains identical across all 5 modes — only the depth of field changes.
Recommended signal timeframes: 1m for Hyper-Scalping and Scalping, 5m for Intraday, 15m for Daily and 1H for Swing.
These TFs will be your references for the trailing activation delay. Concretely, if you activate a delay in number of bars via the parameter, the system will take these timeframes as reference depending on the currently activated mode. Example: if you set 5 bars in Intraday mode, the system will wait for 5 5m candles to close before activating the trailing SL.
═══════════════════════════════════════════════════════════════
Trailing Stop
--- Adaptive Behavior ---
The trailing SL follows a non-linear and intelligent behavior. It uses asymmetric evolving ratios to mathematically increase the probabilities of success and exploitation of price movements. Concretely, it better captures the entirety of price movements and better covers gains.
This trailing SL has 5 types of reactivity settings, each setting will have a different behavior, depending on the distance between price-SL and the trading mode used. Its 5 settings allow for ultra-aggressive scalping as well as swing trading over several weeks! You simply need to select the desired mode.
1 Instant — Immediate reaction, ultra-aggressive scalping
3 Fast — Reactive, scalping/short intraday
7 Moderate — Balanced, standard intraday (default)
15 Slow — Smoothed, daily / short swing
31 Very Slow — Maximum smoothing, long-term swing
⚠ It is strongly recommended to use Demo before going live!
--- Safeties ---
• Anti-return: the SL can never move back, only forward (unless manually modified)
• Update threshold: in % of price, avoids too frequent modifications (adjustable)
• Activation delay: wait X bars before trailing starts
• Automatic restoration: if the SL is manually deleted
═══════════════════════════════════════════════════════════════
Dynamic Take Profit (Dynamic TP)
The system that changes everything.
The Dynamic TP detects in real time the micro-reversals of price during your trade and automatically closes fractions of your position at each favorable wave. No fixed levels, no arbitrary timing — the system reads price momentum and acts surgically when the movement fades.
What it concretely changes:
• Each price oscillation in your favor is captured and locked — it can no longer be lost even if price comes back
• The remaining volume continues running toward the final TP with the trailing SL protecting it
• The longer the trade lasts, the more accumulated gain increases — regardless of the final exit point
• The system automatically adapts to volatility and trailing SL speed
In practice: you open your position, the Dynamic TP works silently at each candle. At the end of the trade, you discover in the logs a complete summary: number of interventions, secured volume, weighted average price and total gain in R. A horizontal blue line appears on the chart showing your real average exit price.
Two key parameters:
1. Dynamic TP Intensity — Three modes:
LOW - Swing — Releases volume slowly, spaced shots, lets big movements breathe.
NORMAL - Versatile — Balance between capture and patience, suited to the majority of configurations.
HIGH - Scalping — Releases volume quickly and aggressively, captures each micro-oscillation.
2. Volume Reserve — the percentage of volume to reserve for the final exit (30% by default). You can also set 0.10 to reserve 10% of volume for the trailing SL/TP and thus let the entire system manage the position volume. The best results have been obtained this way. However, you must adjust this parameter according to the quality of your strategy. The more performant your strategy, the more volume you can reserve for the final exit. The rest of the system is entirely automatic.
═══════════════════════════════════════════════════════════════
CIPHER IS A CONSTANT — The Torture Test
To measure the resistance of the management engine, CIPHER was subjected to the most brutal test possible: connected to simple exponential moving average crossovers (EMA 9/21) — entries that predict nothing and have zero statistical edge — with total free rein. No drawdown limiter. No hour or action limiter. 100% of capital. 1% risk per trade.
The question was simple: how long would CIPHER hold before ruin?
--- Results on EURUSD ---
Conditions: EURUSD, capital $10,000, risk 1%, Intraday 5min mode, SL smoothing 7, Dynamic TP High, volume reserve 10%. Start: January 1st, 2021.
Survival duration .............. 5 years, 3 months and 18 days
Total number of trades ......... 30,777
Win Rate ....................... 81.62%
Profit Factor .................. 0.92
Linear correlation ............. -0.94 (near-perfect straight line)
GHPR (geo growth/trade) ........ 0.9998
Net real cost per trade ........ 0.02% of current capital
The correlation at -0.94 means the equity curve descends in a straight line, from the first to the last trade. A system that derails produces a chaotic curve. CIPHER loses in a straight line. It keeps control. The GHPR at 0.9998 means each trade only consumed 0.02% of current capital — the system was mechanically braking its own destruction.
--- Replication across 7 major pairs ---
The exact same protocol was replicated on six other pairs. The only thing that changes — is the symbol.
EURUSD : Spread 5.1 | PF 0.92 | WR 81.62% | Corr -0.94 | 30,777 trades | GHPR 0.9998
GBPUSD : Spread 7.3 | PF 0.79 | WR 81.18% | Corr -0.81 | 26,542 trades | GHPR 0.9997
USDCHF : Spread 7.3 | PF 0.69 | WR 76.25% | Corr -0.83 | 15,093 trades | GHPR 0.9994
USDJPY : Spread 5.9 | PF 0.84 | WR 80.52% | Corr -0.83 | 27,900 trades | GHPR 0.9997
AUDUSD : Spread 6.7 | PF 0.86 | WR 80.38% | Corr -0.81 | 26,034 trades | GHPR 0.9996
NZDUSD : Spread 8.1 | PF 0.80 | WR 77.34% | Corr -0.87 | 13,766 trades | GHPR 0.9993
USDCAD : Spread 6.5 | PF 0.85 | WR 80.13% | Corr -0.84 | 24,634 trades | GHPR 0.9996
The key finding: The Profit Factor varies because the spread varies — it's a market tax. But the GHPR — the purest measure of what CIPHER does to each position — varies by only 0.017% between the best and worst. Seven pairs. Seven different spreads. Seven markets. Same engine. Same result.
On each pair, wins come in series of 7 to 9. Losses in series of 2. This ratio does not change. Whether on EURUSD, NZDUSD or USDCHF. Seven markets. Same structure. Same breathing. Same signature.
--- What this proves ---
CIPHER is a constant. The engine produces the same result on every market, every pair, every condition. It has been tested across more than 164,000 cumulative trades and its management depends neither on the market, nor on the pair, nor on the quality of the entry. The engine does its job — every time, in the same way.
The tipping point toward breakeven has been measured precisely: the average gain per trade needs to go from $4.76 to $5.16, an improvement of 8.4% on average gains. This means the management engine alone, with zero entry advantage, performs 91.6% of the necessary work. The engine is validated. The engine is stable.
Backtest results do not guarantee future performance. CIPHER is a position management tool — profitability depends on the quality of your entries.
═══════════════════════════════════════════════════════════════
Trailing Take Profit
• The TP follows the white line constantly (unless manually modified)
• Price goes in your direction → TP moves away (more potential)
• Price goes against you or compresses → TP gets closer (secures)
• Update threshold in % of price configurable on the same parameter as the SL
• Mobile TP activatable/deactivatable independently of trailing SL
═══════════════════════════════════════════════════════════════
Partial Take Profits
3 independent levels:
• TP1: 25% of the way Entry → Final TP
• TP2: 50% of the way
• TP3: 75% of the way
For each level: on/off activation and percentage of volume to close.
Behavior:
• Visualization by purple lines on the chart
• Automatic closing when price reaches a level
• Each level triggered only once (no double execution)
• If the final TP moves (trailing), partial levels are recalculated
• It is possible to activate any TP at any time. You can therefore take a position without TP and let it run, then activate at a strategic moment a partial TP that would have already been taken if activated before. At that moment the TP will be taken at market according to the current price level.
═══════════════════════════════════════════════════════════════
Combining Both Take Profit Systems
Classic partial TPs (TP1/TP2/TP3) and Dynamic TP are fully compatible and can operate simultaneously. Both systems can be activated and deactivated independently at any time, including during an open trade.
When both are active, the system automatically coordinates volume: the Dynamic TP reserves its portion of volume for the final exit and works on the remainder in parallel with partial levels. The total volume distributed between classic partial TPs and Dynamic TP is verified at opening to avoid any over-allocation.
═══════════════════════════════════════════════════════════════
Automatic Position Adoption (including from other EAs)
The EA can receive buy and sell signals from another EA then take control of the position by managing the SL and TP tracking! For this, your EA must position its SL at the desired point itself, the TP can be sent at any distance and will be captured by AGENT CIPHER.
What happens:
• Detection of existing position on the symbol
• Retrieval of all data (entry, SL, TP, volume, direction, ticket)
• Recalculation of trailing parameters
• Saving the ticket to avoid duplicates
• Immediate resumption of management
Deferred adoption: If a position exists but does not yet have an SL, the EA waits. As soon as an SL is detected, adoption is triggered.
═══════════════════════════════════════════════════════════════
Advanced Features
--- Actions Limiter (Prop Firms) ---
Designed to comply with position modification rules at prop firms (FTMO imposes 2000 actions max per day). Counting of all actions (openings, closings, SL/TP modifications). Counter per EA/symbol + global counter. Persistent between MT5 restarts (GlobalVariables). Automatic reset at midnight.
0-85% NORMAL Everything works
85-100% SL ONLY Trailing SL active, TP frozen
100% FROZEN SL and TP frozen
Advice: Ask your broker/propfirm if a daily action limit is imposed. You can also play with the SL/TP Update refresh parameter in % to decrease the update frequency.
═══════════════════════════════════════════════════════════════
Manual Modifications
You modify the SL (via MT5):
• The EA detects the change
• Complete recalibration from this new reference point
• The delay counter (bars) restarts at zero
• Trailing continues normally
You modify the TP (via MT5):
• The EA detects the change
• It respects your decision and stops modifying the TP
• Automatic control resumes: the EA takes back control of the TP when the white line crosses the TP or when the distance between the TP and the white line becomes less than 4 pixels on screen. This condition is independent of the Update threshold in % — it is purely visual and automatically adapts to your chart zoom level.
Tip: You can also manually put the actual TP back on the white line after moving it, the EA will resume control! (detailed informative log in the "EXPERTS" tab in MT5)
═══════════════════════════════════════════════════════════════
Information Displayed During Trade
Line 1 — Actions & Hours
Actions counter for this EA (this symbol) • Global actions counter (all EAs, all symbols) • Final configured action limit • Configurable trading time range
Line 2 — Ratio / Risk / Gain
Current R:R ratio (updates because SL moves with trailing) • Actual risk in currency (loss if SL hit) • Potential gain in currency (profit if TP hit)
Line 3 — Daily Drawdown
Current DD (+ if gain, - if loss) • Configured DD limit (reset at 00:00) • Reference balance of the day • [LIMIT REACHED] indicator if threshold reached
Each line is individually activatable/deactivatable. Buttons and lines are movable to any location on the chart.
═══════════════════════════════════════════════════════════════
Capital Protections
--- Daily Drawdown Protection ---
DD% = ((Start of day Balance - Current Equity) / Start of day Balance) × 100
• At midnight (broker time), the EA records the balance as reference
• If the % exceeds the limit during the day → new trades blocked
• Existing positions continue to be managed
• Automatic reset every day at midnight
• Parameter modifiable at any time
--- Intelligent Margin Protection System ---
AGENT CIPHER integrates an automatic protection system that watches over your capital in real time. Before each position opening, the EA verifies that your account has the optimal conditions to take the trade. If available margin is insufficient, the button briefly displays "MARGIN PROTECT" and the entry is refused.
The Risk_Percent parameter you configure defines the size of each position based on your capital. This calculation naturally creates a safety threshold. No additional setting is needed: the protection automatically adapts to your account size, the traded instrument and your broker's leverage.
--- Trading Hours ---
• Configurable range (HH:MM-HH:MM format, broker time)
• Outside range: EXECUTE button grayed out, opening impossible
• If a position is opened during allowed hours, at the minute when the end time is reached the position will be closed
• The system is 24/7 by default
--- SAFETY ONTICK Security ---
The code contains a safety that immediately closes at market if the price exceeds SL/TP without execution → GUARANTEED MARKET EXIT ON ALL BROKERS → no SL slippage!
--- Visual SL History ---
• Each SL movement is traced as a segment on the chart
• Color according to direction: green (LONG) / red (SHORT)
• Keeping the last 50 trades
• Automatic cleaning of oldest ones
• Allows visual analysis of your trade management
--- Real-time ASK Line ---
Purple line that follows the ASK price tick by tick. Visualizes the spread constantly. SPREAD = the DIFFERENCE between ASK and BID.
--- Multi-symbols ---
Launch multiple EAs on multiple symbols with a shared global counter.
═══════════════════════════════════════════════════════════════
Technical Compatibility
Lot calculation:
• Universal TickValue/TickSize method
• Works on all instruments: Forex, indices, metals, crypto, stock CFDs
• Risks exactly the defined %, regardless of the symbol
• Automatic respect of broker constraints (min, max, step lot)
Synchronization and reliability:
• Permanent cache/server reconciliation
• Automatic detection if the position is closed outside the EA
• Clean reset of all variables in this case
• Systematic validation before each trading action
• Complete descriptive logs on the overall state of the EA and position management
Parameter change detection:
The EA detects in real time if you modify parameters. It applies them instantly or on the next tick depending on the type. No need to remove and put the EA back: changes are applied on the fly.
═══════════════════════════════════════════════════════════════
Visual Backtest Mode
You can run the visual Backtest mode on MT5. The system automatically places trades based on a simple EMA crossover. It is only used to visualize and absorb the behavior of the system according to different possible parameters and market evolution. In live, only you can place trades by pressing the button!
═══════════════════════════════════════════════════════════════
What You Can Do
• Adjust the SL above or below the price before entering and see the ratio/risk change in real time
• Modify the SL during the trade → the EA recalibrates everything
• Modify the TP during the trade → the EA respects your choice and adapts the trailing SL
• Put the TP back on the white line → the EA resumes control of the TP
• Play between putting the TP on the white line, on the blue line or manual mode on the chart
• Adjust the trailing SL smoothing according to volatility at any time
• Configure a delay timer in bars before trailing SL activation
• Combine classic partial TPs + Dynamic TP + trailing to progressively secure
• Activate or deactivate each TP system independently at any time, including during an open trade
• Launch multiple EAs on multiple symbols with global counter
• Customize position and size of buttons
• Adjust the thickness of graphic lines
═══════════════════════════════════════════════════════════════
Quick Reference — Button States
Green EXECUTE TRADE Ready to open
Blue MARGIN PROTECT Insufficient margin (3 sec)
Gray IN POSITION Trade in progress
Gray OUT OF HOURS Outside time range
Orange DD LIMIT! Daily drawdown reached
Orange SL/TP FROZEN Actions > 100%
Gold SL ONLY MODE Actions 85-100%
⚡ CLOSE Button: Instantly cuts the position if pressed.
═══════════════════════════════════════════════════════════════
My YouTube Channel
Find tutorials and demonstrations on my channel:
https://www.youtube.com/channel/UCkjtuoH43m0QOTLgDWu1pFg
═══════════════════════════════════════════════════════════════
⚠ Warning: Trading on financial markets carries significant risks of capital loss. Past performance does not predict future performance. Agent CIPHER is a position management tool and does not constitute investment advice or a guarantee of results. Only trade with funds you can afford to lose.
