JadeQilin Two-way Pending-order MT5 Source Code
Pinned Monthly
Influencer
MT5
Two-way pending-order grid + auto two-profile switch + counter-trend protection + trend-following protection + SuperTrend filter & reversal + built-in news filter + pro panel. Good for markets alternating range and trend.
Details & Usage Instructions
JadeQilin MT5 EA is an MT5 two-way pending-order grid trading system.
Builds the grid via BuyStop / SellStop; fills on breakout.
Built-in SuperTrend filter & reversal, RSI filter, counter-trend protection, trend-following protection, built-in USD high-impact news pause, intraday wrap-up, daily profit target — with a pro panel and quick buttons, good for markets alternating range and trend.
Core Features
1. Two-way Pending-order Grid
Long/short independent, BuyStop / SellStop tracking.
First-order distance, min distance, refill spacing, second-refill spacing tiered.
Order price moves with current price; auto-rewrite at trailing step.
Lot increases by lot × K_Lot^n + PlusLot × n, max lot cap.
2. Auto Two-profile Switch
After floating loss hits the Money threshold, auto-switch to the second param set (spacing, min distance).
Reduces deep-averaging density, lowering blow-up risk.
3. Counter-trend Protection (CloseBuySell)
Triggers when one-side holding far exceeds the other.
Close that side's 1 most-profit + 2 most-loss orders.
Shrinks net exposure, preventing one-side infinite accumulation.
4. Trend-following Protection (HomeopathyCloseAll)
Enabled when fully locked.
Close all when overall profit reaches CloseAll.
Close that side per conditions when one-side floating loss exceeds limit.
5. SuperTrend
Classic ATR-based SuperTrend algorithm.
Optional filter: only open in SuperTrend direction.
Optional reversal: on trend flip, unconditionally open a trend-following order (one per flip, no averaging).
Reversal orders have independent magic, lot and TP/SL.
Draws channel lines, flip trigger-price line, conversion labels on chart.
6. RSI Filter
Allow long only on RSI oversold, short only on overbought.
Set "filter first order only" or "filter every refill".
7. Built-in USD High-impact News
Backtest uses 615 built-in USD high-impact news (2025-01-01 to 2026-04-03).
Live uses MT5 economic calendar in real time.
Pause opens N minutes before news, cooldown N minutes after.
If holding during news, wait for all to close.
8. Trading Sessions & Intraday Wrap-up
EA start / end time.
Intraday wrap-up phase (default 23:00-24:00): stop new opens, wait for close.
Daily profit target: after daily progress hits target, lock; auto-release next day.
9. Risk Control
One-side floating loss over MaxLoss → stop that side's averaging.
One-side floating loss over MaxLossCloseAll → trigger one-side close.
Total stop-loss amount adjustable.
Max positions, max spread, min leverage limits.
Cooldown N seconds after close before new round.
10. Chart Visualization
Long average line / short average line.
SuperTrend channel lines (long/short segments colored).
Trend-flip trigger-price horizontal line.
SuperTrend conversion labels.
Limit lines (no long above B / no short below S).
Custom chart background image (center + shift right 200px).
Pro Panel
Run & Positions
Work state: working / news-paused / wrapping / manual-paused / awaiting-close
Trade state, long/short switch
Session, wrap-up, news, target, reason
Filter state: RSI / ST / reversal mode / first-order filter
Today's / historical max floating loss
SuperTrend direction, flip trigger price
Today's target & account
Today closed, today progress, target remaining
Buy count / lots, Sell count / lots
Buy floating profit, Sell floating profit, EA total floating P/L
Yesterday closed, cumulative closed
Balance, equity, margin ratio, spread, leverage
Quick Actions
Stop / start trading
Stop / start long, short
Close current symbol, close profit, close loss
Close long, close short, close this EA all, close account all
Panel supports collapse / expand.
Suitable Market
Good for ranging markets, trending markets with pullbacks.
Not for strong one-sided, no-pullback, frequent-gap extreme markets.
Builds the grid via BuyStop / SellStop; fills on breakout.
Built-in SuperTrend filter & reversal, RSI filter, counter-trend protection, trend-following protection, built-in USD high-impact news pause, intraday wrap-up, daily profit target — with a pro panel and quick buttons, good for markets alternating range and trend.
Core Features
1. Two-way Pending-order Grid
Long/short independent, BuyStop / SellStop tracking.
First-order distance, min distance, refill spacing, second-refill spacing tiered.
Order price moves with current price; auto-rewrite at trailing step.
Lot increases by lot × K_Lot^n + PlusLot × n, max lot cap.
2. Auto Two-profile Switch
After floating loss hits the Money threshold, auto-switch to the second param set (spacing, min distance).
Reduces deep-averaging density, lowering blow-up risk.
3. Counter-trend Protection (CloseBuySell)
Triggers when one-side holding far exceeds the other.
Close that side's 1 most-profit + 2 most-loss orders.
Shrinks net exposure, preventing one-side infinite accumulation.
4. Trend-following Protection (HomeopathyCloseAll)
Enabled when fully locked.
Close all when overall profit reaches CloseAll.
Close that side per conditions when one-side floating loss exceeds limit.
5. SuperTrend
Classic ATR-based SuperTrend algorithm.
Optional filter: only open in SuperTrend direction.
Optional reversal: on trend flip, unconditionally open a trend-following order (one per flip, no averaging).
Reversal orders have independent magic, lot and TP/SL.
Draws channel lines, flip trigger-price line, conversion labels on chart.
6. RSI Filter
Allow long only on RSI oversold, short only on overbought.
Set "filter first order only" or "filter every refill".
7. Built-in USD High-impact News
Backtest uses 615 built-in USD high-impact news (2025-01-01 to 2026-04-03).
Live uses MT5 economic calendar in real time.
Pause opens N minutes before news, cooldown N minutes after.
If holding during news, wait for all to close.
8. Trading Sessions & Intraday Wrap-up
EA start / end time.
Intraday wrap-up phase (default 23:00-24:00): stop new opens, wait for close.
Daily profit target: after daily progress hits target, lock; auto-release next day.
9. Risk Control
One-side floating loss over MaxLoss → stop that side's averaging.
One-side floating loss over MaxLossCloseAll → trigger one-side close.
Total stop-loss amount adjustable.
Max positions, max spread, min leverage limits.
Cooldown N seconds after close before new round.
10. Chart Visualization
Long average line / short average line.
SuperTrend channel lines (long/short segments colored).
Trend-flip trigger-price horizontal line.
SuperTrend conversion labels.
Limit lines (no long above B / no short below S).
Custom chart background image (center + shift right 200px).
Pro Panel
Run & Positions
Work state: working / news-paused / wrapping / manual-paused / awaiting-close
Trade state, long/short switch
Session, wrap-up, news, target, reason
Filter state: RSI / ST / reversal mode / first-order filter
Today's / historical max floating loss
SuperTrend direction, flip trigger price
Today's target & account
Today closed, today progress, target remaining
Buy count / lots, Sell count / lots
Buy floating profit, Sell floating profit, EA total floating P/L
Yesterday closed, cumulative closed
Balance, equity, margin ratio, spread, leverage
Quick Actions
Stop / start trading
Stop / start long, short
Close current symbol, close profit, close loss
Close long, close short, close this EA all, close account all
Panel supports collapse / expand.
Suitable Market
Good for ranging markets, trending markets with pullbacks.
Not for strong one-sided, no-pullback, frequent-gap extreme markets.

Risk Warning:Resources on this site are for learning, research and technical exchange only, and do not constitute any investment advice. Before running any EA on any account, please do thorough forward-testing on a demo account first; no strategy can guarantee profits.