Whale Tick Candle Compression Breakout
- Experts
- Mustafa Ozkurkcu
- Versione: 1.0
- Attivazioni: 5
Trade Whale – Tick Compression Breakout (v1.0) is a short-term breakout scalper that filters setups via ATR-based compression. After price coils in a tight band on your chosen timeframe (e.g., H1), it opens a position when the previous candle’s high/low is broken. Risk is anchored by SL = ATR × multiplier, while TP is an R-multiple of that stop distance (e.g., 2.0R). Position size can be percent-risk or fixed lot, and is margin-clamped to broker limits for safety. A timeout can auto-close positions to maintain discipline, and you may restrict trades to buys only or sells only.
How the Strategy WorksBecause entries depend on live breaks of the prior candle, backtesting with Every tick / Real ticks is recommended.
-
Compression Detection
On the selected timeframe (e.g., H1), compute the range of the last LookbackBars ( highest − lowest ) and compare it to current ATR(ATRPeriod).
Rule: If (range / ATR) < CompressionRatio , conditions are “compressed,” so a breakout is worth tracking. -
Breakout Trigger
After compression is confirmed, new ticks check for:
-
BUY: ask > previous_high
-
SELL: bid < previous_low
If true, open a trade in that direction (subject to risk checks).
-
Stop & Take-Profit
-
Stop-Loss (SL): Start from ATR × ATRMultiplier , then pass the distance through a safety function to satisfy broker stop/freeze/tick-size constraints.
-
Take-Profit (TP): TakeProfitRMultiple × stop_distance (e.g., 2.0R).
-
Position Sizing with Margin Clamp
-
Percent-Risk mode: Risk money = balance × RiskPercent → convert to lots using stop distance and tick value.
-
Fixed-Lot mode: Use the specified lot.
In both cases, lots are capped by available margin (via OrderCalcMargin ) and snapped to minLot / maxLot / lotStep . If margin can’t support min lot, the entry is skipped.
-
Timeout Management
If a position remains open beyond MaxOpenMinutes, the EA closes it (optional). -
Diagnostics (Optional)
-
TesterProbeTrade: In Strategy Tester, if margin permits, place one tiny trade to quickly verify permissions/environment.
-
DebugLogs: Print detailed logs for troubleshooting.
General Settings
-
Timeframe — Working timeframe for ATR, compression range, and breakout (e.g., PERIOD_H1 ).
-
MaxOpenMinutes — Maximum holding time (minutes).
-
LotMode — LM_RiskPercent (percent-risk) or LM_FixedLot (fixed lot).
-
RiskPercent — Percent of balance risked per trade (used when LM_RiskPercent ).
-
FixedLot — Lot size used when LM_FixedLot .
-
MagicNumber — Unique ID so the EA isolates its own trades.
-
SlippagePoints — Allowed deviation in points.
Volatility & Compression
-
ATRPeriod — ATR lookback on the chosen timeframe.
-
ATRMultiplier — Base SL distance as ATR × multiplier (later adjusted to broker limits).
-
CompressionRatio — Compression threshold; (range / ATR) < ratio means compressed.
-
LookbackBars — Bars used to compute highest − lowest for the range.
Trade Management
-
UseTakeProfit — Enable/disable TP.
-
TakeProfitRMultiple — TP distance as an R-multiple of SL (e.g., 2.0R).
-
CloseOnTimeout — Close positions when MaxOpenMinutes elapse.
-
AllowBuys / AllowSells — Restrict to long-only or short-only if desired.
Diagnostics
-
TesterProbeTrade — In Tester, place a single micro trade if margin allows (quick sanity check).
-
DebugLogs — Verbose logging for development/testing.
-
Backtest model: Use Every tick / Real ticks for realistic trigger behavior.
-
Symbol specifics: Metals, indices, and crypto have different tick sizes/values; percent-risk sizing accounts for this automatically.
-
Compression sensitivity: Lower CompressionRatio = stricter filter; higher = more permissive.
-
Broker safety: The SL distance is adjusted to meet stop level / freeze level / tick size constraints to avoid invalid stops.
-
Margin safety: If available margin can’t support minLot, the EA skips the trade to protect the account.
-
Scope of v1.0: Trend/session filters and advanced exits (partial TP / BE / trailing) are not included in v1.0 but can be added in a later revision.
Automated trading involves substantial risk.
-
Capital at Risk: Trading can result in the loss of all invested capital.
-
Past ≠ Future: Historical performance does not guarantee future results; volatility regimes change.
-
Liquidity & Slippage: News, gaps, and spread widening can cause slippage or missed stops.
-
Broker Conditions: Contract size, min stop, tick value, commissions/spreads materially affect outcomes.
-
Testing: Start on demo/forward tests, then small live trials. Only trade with money you can afford to lose.
