CONFIGURATION DOCUMENTATION

MATS EA — Input Guide

Meanings, examples, and processing logic for parameters declared with input in mats_config.mqh. English version of the Vietnamese guide updated September 17, 2026. Parameter names and raw default values are preserved.

Conventions: 0 usually disables a threshold; time uses HH:MM:SS; money is in account currency; lot sizes are always normalized to broker rules.
Risk: DCA, multipliers, and Lot Balance can rapidly increase exposure, margin usage, and drawdown. Test with Strategy Tester and a demo account.
Key Level colors: Bullish FVG is blue; Bearish FVG orange; Liquidity High/Low gold; support green; resistance pink; BUY zones green; SELL zones red. Rectangles are translucent, so overlapping green BUY and red/orange SELL zones may appear purple. This marks overlap/conflict, not a separate signal type.
Online license: In MT5, open Tools → Options → Expert Advisors, enable Allow WebRequest, and add https://mtsea-lima.metatechsolutions.vn. Enable Notifications for expiry alerts.

EA Identity

Order identification and trading direction modes.
Processing logic: TradeMode defines the initial direction state. BUY_AND_SELL allows two chains; BUY_OR_SELL permits only one direction at a time. ONLY_BUY/ONLY_SELL match the corresponding control buttons. UI buttons and shortcuts can still change the direction during a running session.
InputDefaultMeaningExample / notes
MagicNumber0EA magic number.Use a unique value for each EA; 0 also takes over manual trades.
OrderCommentMATSEAOrder comment prefix.CHoCH uses OrderComment|B|0|CH|timeframe or OrderComment|S|0|CH|timeframe, e.g. MATSEA|B|0|CH|1 on M1; no timestamp is added. Standard Entry uses OrderComment|B|0|source or OrderComment|S|0|source: ST=Stochastic, RS=RSI, TR=Supertrend, CD=Candle with Entry lots, SR=Stochastic Reverse, BB=Bollinger Bands. Enabled sources confirming the order direction are joined by +, e.g. MATSEA|B|0|ST+RS or MATSEA|S|0|BB. Only matching directions from the current cache are included, not neutral or disabled sources. Separate Candle mode retains |CS; CHoCH retains |CH|timeframe; DCA classification is unchanged. AwareTrend follows the same source format: SA with Auto SL/TP off, SA3 with it on, e.g. MATSEA|B|0|SA, MATSEA|S|0|SA3, or RS+SA3 for agreement. Combined Candle/CHoCH with Auto SAT retains its tag and adds SA3. No prefix is added before OrderComment. Older orders starting with SA3| still receive partial-TP management.
TradeModeBUY_AND_SELLAllow both chains or restrict trading direction.MATS_BUY_AND_SELL, MATS_BUY_OR_SELL, MATS_ONLY_BUY, or MATS_ONLY_SELL. On reinitialization, the TradeMode input takes priority over saved button state.

General

Lot size and protection for the first order in a chain.
Processing logic: A Candle order starting a new chain also uses FirstTPPips/FirstSLPips; CandleSignalLot only changes volume. See the Auto SAT overrides below.
InputDefaultMeaningExample / notes
InitialLots0.04Base lot size for the first order; Candle fallback when CandleSignalLot=0.May be affected by the time-based lot profile.
FirstTPPips200Broker TP for the first order; 0 disables it.Also applies when Candle starts a chain. Entry with SelfAwareTrend and UseSelfAwareAutoSLTP=true uses TP1/TP2/TP3 based on R.
FirstSLPips0Broker SL for the first order; 0 disables it.Also applies when Candle starts a chain. Entry with SelfAwareTrend and UseSelfAwareAutoSLTP=true gives priority to automatic SL.
OpenOnNewCandletrueLimit Entry/Candle/Bias entries to one per EntryTimeframe candle.Entry can occur immediately if no order has opened in the current candle; otherwise wait for the next candle. DCA timing remains controlled by DcaType.

Timeframes

Timeframes for signals, trends, Zone AI, and the Bias Filter.
Processing logic: EntryTimeframe drives new-bar/candle processing. TrendTimeframe is used by EMA, MACD, ADX + DI, and Market Structure. HigherTimeframe provides HTF Alignment, Zone AI, and Bias/Key Levels. Filters read closed candles to avoid incomplete signals. With UseAutoCandleStopLoss=true, Candle signals still use EntryTimeframe, while structural invalidation, swings, and ATR(14) come from closed TrendTimeframe candles.
InputDefaultMeaningExample / notes
EntryTimeframeM1Shared timeframe for Entry sources, including Stochastic Reverse and Bollinger Bands.Reverse/BB have no separate timeframe: this input changes both their indicator timeframe and candle clock. DCA also uses it for limits/timing according to DcaType. SelfAwareTrend uses it as well.
TrendTimeframeM15Trend timeframe.EMA, MACD, ADX + DI, and Market Structure use this timeframe. Auto Candle SL also uses it to find invalidation highs/lows and the nearest confirmed swing.
HigherTimeframeH1HTF context for HTF Alignment, Zone AI, and the Bias Filter.HTF Alignment and Bias read closed HTF candles; changing this timeframe changes direction, structure, and points of interest.

Trend Strategy Suggestion

Select an EMA, MACD, ADX + DI, Market Structure, and HTF Alignment preset, or NONE for manual inputs. Presets do not change timeframes or automatically enable/disable filters.
Processing logic: MT5 does not let one input rewrite the displayed value of another. A selected preset supplies the complete internal profile even though the input fields still show the manual values. Select NONE to use and adjust those values directly. The Trend UI always displays the effective values.
InputDefaultMeaningExample / notes
TrendStrategySuggestionMATS_TREND_NONETrend strategy profile or manual-input mode.NONE: use inputs directly, with no fallback. FAST: EMA 9/21, MACD 8/21/5, ADX 10 with minimum 18, Structure 40/2, HTF 20/50. BALANCED: 21/55, 12/26/9, 14 with minimum 22, 80/3, 50/200. SAFE: 34/89, 24/52/9, 14 with minimum 25, 120/4, 50/200. LONG_TERM: 50/200, 30/65/12, 20 with minimum 25, 200/5, 100/200.

Limits

Limits on open positions per side, spread, lot size, and entry frequency.
Processing logic: MaxLots caps every order, including Candle. CandleSignalLot=0.50 requires MaxLots≥0.50 for the full volume. MaxBuyOrders/MaxSellOrders are checked at the shared order gateway against open positions matching the symbol and EA magic, including the Balance magic offset. MagicNumber=0 includes all positions on the symbol. For example, with MaxBuyOrders=20, 5 Entry + 4 Candle + 3 Bias + 6 DCA + 2 Balance BUY positions block further BUY entries; SELL has its own limit. Closing positions frees capacity. Special tags do not advance DCA progression but still count toward these limits.
InputDefaultMeaningExample / notes
MaxBuyOrders20Maximum open BUY positions within the EA scope.Counts Entry, Candle, Bias, DCA, and Balance, including INDEPENDENT Balance; does not use dcaCount to check the limit.
MaxSellOrders20Maximum open SELL positions within the EA scope.Counts Entry, Candle, Bias, DCA, and Balance, including INDEPENDENT Balance; does not use dcaCount to check the limit.
MaxSpreadPips30Block new orders when spread is too high.Adjust for the symbol.
MaxLots0.25Maximum lot size per order.Broker maximum volume and lot step also apply.
OpenDelaySeconds2Normal delay between order openings.Exception: one |CS or |BF order may accompany one DCA in the same tick; that DCA bypasses the open delay.

Lots by time window

Override the lot profile during a local-time window.
Processing logic: Within the local-time window, separate profiles apply to standard Entry, Candle, Bias, the shared Entry/DCA lot cap, and pruning. DCA uses InitialLots (or ResetLots after auto reset) and LotMode as its base, not LotTimeNewLots/LotTimeCandleLots/LotTimeBiasLots. Entry and DCA use LotTimeMaxLots inside the window and MaxLots outside; DCA auto reset follows the active cap. ADD mode still adds LotAddFactor to the latest open DCA/standard Entry lot; Candle/Bias do not change the DCA anchor. Example: InitialLots=0.1, multiplier=1.5, dcaCount=1 gives a MULTIPLY DCA lot of 0.15 even if LotTimeNewLots=0.01, provided the cap allows it. With LotTimeMaxLots=0.1 and auto reset off, volume is capped at 0.1.
InputDefaultMeaningExample / notes
UseLotByTimefalseEnable the time-based profile.Adjust exposure by session.
LotTimeStart11:00:00Local-time window start.The window may cross midnight.
LotTimeEnd21:00:00Local-time window end.The window may cross midnight.
LotTimeNewLots0.01Standard Entry lot size inside the window.Does not change the base DCA lot; UseCurrentDcaLotForEntry still applies if enabled.
LotTimeCandleLots0.1Separate Candle Entry lot size inside the window.0 uses LotTimeNewLots; the final lot is still capped by LotTimeMaxLots and broker limits.
LotTimeBiasLots0.1Separate Bias Entry lot size inside the window.0 uses LotTimeNewLots; outside the window, revert to BiasFilterLot.
LotTimeMaxLots0.25Lot cap for both Entry and DCA inside the window.LotTimeMaxLots applies inside, MaxLots outside. The auto-reset threshold follows the active cap.
LotTimeMinPruneLot0.10Minimum lot size for partial pruning.Temporary override during the window.

Auto lot reset (at max lot)

Switch profiles when DCA lot size reaches the cap.
Processing logic: The EA latches ResetLots/ResetMultiplier/ResetChainTPPips and restores the state after restart.
InputDefaultMeaningExample / notes
UseAutoLotResetfalseEnable progression reset.Does not close the chain.
ResetLots0.01Lot size after reset.Must be greater than 0.
ResetMultiplier1.2Multiplier after reset.Usually lower than the initial value.
ResetChainTPPips200Chain TP after reset.Used for chain exit.

Entry conditions

Independently select Stochastic, RSI, Supertrend, Candle, CHoCH, Stochastic Reverse, Bollinger Bands, and the additional adaptive SelfAwareTrend reversal source. They share EntryTimeframe; there is no SATS dashboard.
Processing logic: Each source returns BUY (+1), SELL (-1), or NONE (0) from closed candles. AND requires every participating signal to be nonzero and in the same direction. OR needs at least one nonzero signal, but simultaneous BUY and SELL cancel the result. Combined signals must still pass all safety gates. Candle participates when EntryCandle or UseCandleSignalForEntry is true. EntryCandle=true with UseCandleSignalForEntry=false uses Entry lots to start a chain and does not add separate Candle orders. If UseCandleSignalForEntry=true, Candle logic and lots take priority, including time-based lot rules, regardless of EntryCandle. Both false disables Candle trading. Candle participates only once and shares a persisted signal timestamp to prevent duplicate Entry/Candle orders, including after restart. This priority does not bypass AND/OR, filters, or pending CHoCH. Older .set files must select the new switches instead of the old mask. CHoCH is selected by EntryCHoCH, is valid during the following candle, and sends at most one request when conditions pass; see CHoCH Structure Entry. Signals read closed candles when a new EntryTimeframe bar appears: [1] is the latest closed candle, [2] the previous one. Cache lasts until the next EntryTimeframe candle; successfully processed bars are not reevaluated. Missing data, EMPTY_VALUE, or CopyBuffer errors temporarily return 0 without marking the bar processed, allowing retry on later ticks. Reverse and BB share EntryTimeframe. For Reverse BUY: BB SELL conflicts, BB BUY agrees, and BB=0 preserves BUY only under OR. Cached signals are not consumed after an order; avoiding duplicate evaluation is not the same as limiting each signal to one order. OpenOnNewCandle, trend filters, pause/license, limits, and the gateway still apply. OpenOnNewCandle=true permits one Entry per EntryTimeframe candle, including a later tick once data becomes available if no managed order has opened in that candle. DCA does not use Entry-source switches and retains its own DcaType and trend filters. The dashboard lists enabled Entry sources in two columns, at most two per row, with separators. Panel height and SignalCombine/License positions adjust to the row count. The common timeframe appears in the Entry Signals heading; individual labels use Stoch Rev and BB. Candle is shown once when either Candle switch is enabled. SelfAwareTrend auto presets: up to M5, Scalping (ATR 10, ER 14, band 1.5, SL 1.0 ATR); above M5 through H4, Default (14, 20, 2.0, 1.5); above H4, Swing (21, 30, 2.5, 2.0). Source is Close; default TQI combines ER/volume/structure/momentum, effective ATR, and smoothed asymmetric bands. BUY/SELL occurs only on a reversal in the latest closed candle. There is no score gate, self-learning, or trading timeout. Insufficient data waits and retries. AND/OR and existing Trend, Bias, Zone, time, spread, lot, limit, and DCA rules remain in force. Each SAT signal can attempt submission at most three times, at least five seconds apart within the current Entry candle. Retry only before broker submission or after a clear temporary rejection (requote, changed/unavailable prices, too many requests, or processing lock). Filled, pending, partially filled, or uncertain results such as timeout/disconnection remain locked against duplicates, including after restart. Unmet filters may wait within the same Entry candle. SAT does not add entries to an existing chain except under the current CHoCH rules.
InputDefaultMeaningExample / notes
EntryStochasticfalseEnable the existing Stochastic source in AND/OR.Retains MAIN/K comparison with 50.
EntryRSIfalseEnable RSI in AND/OR.Retains RSI comparison with 50.
EntrySupertrendfalseEnable Supertrend in AND/OR.Separate parameters are in the Supertrend group.
EntryCandletrueSelect Candle in AND/OR.EntryCandle=true and UseCandleSignalForEntry=false starts a chain with Lot_First (Entry lots), without additional Candle orders in the chain.
EntryCHoCHtrueSelect CHoCH in AND/OR.Retains the existing pending mechanism and CHoCH processing priority.
EntryStochReversetrueSelect Stochastic Reverse in AND/OR.Uses EntryTimeframe and separate thresholds; does not replace the existing Stochastic source.
EntryBollingerBandstrueSelect Bollinger Bands in AND/OR.Uses EntryTimeframe; a close outside a band is a signal.
EntrySelfAwareTrendfalseEnable SelfAwareTrend in the existing Entry combiner.Independent of EntrySupertrend; preset selection uses EntryTimeframe, not the chart timeframe unless EntryTimeframe=CURRENT.
SignalCombineORHow participating signal directions are combined.AND requires all signals to agree and none to be NONE. OR ignores NONE but returns NONE if BUY and SELL conflict.

DCA

Add orders when price moves against the chain.
Processing logic: Each side maintains its own dcaCount, anchor, and progression. DcaType controls timing independently of OpenOnNewCandle: STEP_TF can open as soon as distance is met, at most one DCA per EntryTimeframe candle per side. STEP_CLOSE checks only at the start of a new candle and reevaluates all conditions. OpenOnNewCandle therefore affects only Entry/Candle/Bias. |CS, |BF, and |LB do not change the DCA anchor or lot progression. From DcaTrendFilterOrderCount onward, DCA must pass enabled trend filters. ATR locks a separate BUY/SELL threshold after Entry/DCA or another chain order fills and positions update; a partial fill increasing volume also relocks it. It does not relock every tick/bar or simply because positions partially close. The dcaCount factor is locked along with the distance. |CS/|BF/|LB still do not increment dcaCount or change anchor rules. A flat chain clears the threshold. Restart, input changes, or taking over existing positions initializes it from the latest ATR[1] and current dcaCount. ATR errors, insufficient history, or nonpositive ATR block the side requiring a threshold, log once, and retry; no fixed-distance fallback is used. Anchor prices, BUY versus Ask, SELL versus Bid, lot sizes, filters, TP/SL, and gateway rules remain unchanged. DCA logs show ATR and the locked price threshold. The dashboard hides Balance/Equity. The EA area shows DCA On/Off from UseDCA and STEP_TF/STEP_CLOSE/ATR mode. Step (price) is hidden, but distance calculation and locking still work as described. On indicates the feature is enabled, not that an order must open immediately; all trading gates still apply.
InputDefaultMeaningExample / notes
UseDCAtrueEnable additional DCA orders.false only manages existing orders.
DcaTrendFilterOrderCount1Existing progression-order count at which all trend filters begin applying to DCA; 0 disables DCA trend filtering.With N=5, once the chain contains 5 progression orders (standard Entry + DCA, excluding |CS/|BF/|LB), the next DCA must pass trend filters. DCA does not use Entry-source switches.
DcaTypeATRSTEP_TF=0 and STEP_CLOSE=1 retain their behavior; ATR=2 uses locked ATR distance.STEP_TF and ATR can open immediately on reaching distance, at most one DCA per EntryTimeframe candle per side. STEP_CLOSE checks only the new-candle tick. Closed-bar ATR calculates distance; it does not force waiting for a close to open. Multiply/Add/Manual LotMode is independent.
LotModeMULTIPLYMultiply, add, or use a manual list.Candle does not participate in progression.
InitialMultiplier1.2Lot multiplier.InitialLots × multiplier^count.
LotAddFactor0.01Lot increment in ADD mode.Based on lastDcaLot, not Candle lots.
SingleOrderTPPips0Individual TP for each DCA order; 0 disables it.Chain TP remains active.
ChainTPPips100Close the chain by distance from break-even (BE).BE includes DCA/Candle/LB in the same chain.
ChainTPMoney0Close the chain by total monetary profit.Candle profit is included.
DcaStepPips100Base pip distance in STEP_TF/STEP_CLOSE; base floor in ATR mode.ATR price threshold = max(PipToPrice(DcaStepPips), ATR[1] × DcaATRMultiplier) × max(1,dcaCount). Example: price floor 1, ATR=2, multiplier=1.5, dcaCount=3 gives a threshold of 9 price units. ATR is not converted to pips again. ATR floor may be 0; the two older modes require >0 when DCA is enabled.
DcaATRPeriod14Separate DCA ATR period for DcaType=ATR; minimum 1.Always uses EntryTimeframe, closed candle shift=1, and a separate handle from filters.
DcaATRMultiplier1.5Positive finite ATR multiplier, used only in ATR mode.Base price distance = max(PipToPrice(DcaStepPips), ATR × DcaATRMultiplier).
UseCurrentDcaLotForEntryfalseStart a chain with its own base lot or inherit the opposite DCA level.false: independent BUY/SELL from EffectiveInitialLot. true: max(EffectiveInitialLot, opposite.lastDcaLot). Does not change CandleSignalLot or BiasFilterLot.
UseTrendFilterScoringtrueSelect SCORE or CONSENSUS.false: panel shows ON/OFF and requires full consensus. true: Filter Combine shows direction and signed score, e.g. B SCORE +10/ Min +3, S SCORE -7/ Min -3, or N SCORE 0/ Min +3 for zero total.
EmaTrendScore2EMA Filter weight in SCORE mode.BUY adds and SELL subtracts; 0 keeps EMA visible without contributing points.
MacdTrendScore1MACD Filter weight in SCORE mode.Counted only when UseMacdFilter=true and the filter returns BUY or SELL.
BiasTrendScore2Bias Filter weight in SCORE mode.Participates only when UseBiasFilterAsTrendFilter=true.
MarketStructureTrendScore2Market Structure weight in SCORE mode.HH/HL and BOS BUY add points; LH/LL and BOS SELL subtract. CHOCH uses the new structure direction; neutral contributes nothing.
AdxTrendScore1ADX + DI weight in SCORE mode.ADX must be strong enough; +DI/-DI determines the sign.
HtfAlignmentTrendScore2HTF Alignment weight in SCORE mode.HTF EMA direction determines whether this weight is added or subtracted.
VwapTrendScore2VWAP weight in SCORE mode.Price must be on the correct side of VWAP and slope must match the direction.
VolumeProfileTrendScore2Volume Profile Bias weight in SCORE mode.Rising POC gives BUY; falling POC gives SELL, with price also on the correct side of POC.
TrendFilterMinScore3Minimum score in the trading direction.With threshold 3, B SCORE +4/ Min +3 or S SCORE -4/ Min -3 passes; +2/-2 does not. B=BUY, S=SELL, N=neutral. The prefix indicates score direction, not confirmation of an opened order.

Stepped multiplier (new multiplier by order count)

Change the multiplier by dcaCount.
Processing logic: Multipliers are compounded across historical tiers. A new tier affects only steps from its activation onward; the new multiplier is not raised to the entire previous dcaCount. This avoids abrupt lot jumps at tier changes.
InputDefaultMeaningExample / notes
UseNewMultiplierfalseEnable the multiplier table.false uses InitialMultiplier.
NewMultCount15dcaCount threshold for tier 1.Set thresholds in increasing order.
NewMult11.5Multiplier at tier 1.Can be reduced for deeper chains.
NewMultCount28dcaCount threshold for tier 2.Set thresholds in increasing order.
NewMult21.3Multiplier at tier 2.Can be reduced for deeper chains.
NewMultCount313dcaCount threshold for tier 3.Set thresholds in increasing order.
NewMult31.2Multiplier at tier 3.Can be reduced for deeper chains.
NewMultCount421dcaCount threshold for tier 4.Set thresholds in increasing order.
NewMult41.15Multiplier at tier 4.Can be reduced for deeper chains.
NewMultCount530dcaCount threshold for tier 5.Set thresholds in increasing order.
NewMult51.1Multiplier at tier 5.Can be reduced for deeper chains.

Manual lot list

Fixed lot size for each DCA step.
Processing logic: Used only with LotMode=MANUAL. The first DCA uses element [0], the second [1]; after the list ends, the last value is retained. Candle/Bias/Balance do not use this list.
InputDefaultMeaningExample / notes
ManualLotList0.01-0.01-0.01-0.02-0.02-0.02-0.03-0.03-0.04-0.04-0.05-0.05-0.06-0.06-0.07-0.07-0.08-0.08-0.09Lot values separated by hyphens (-).Every value must be positive.

Cross-chain pruning (Sniper)

Use recent winners to close older losing positions.
Processing logic: Closing occurs only when expected net profit reaches the threshold. Partial closing also depends on the broker volume step.
InputDefaultMeaningExample / notes
UseSnipertrueEnable pruning.Disable if you do not want automatic pruning.
SniperTriggerTotal15Minimum total order count.Does not run below this threshold.
SniperFirstCount3Number of older losing orders.Prioritizes older losers.
SniperLastCount5Number of recent winners; 0 selects automatically.0 avoids closing more than needed.
SniperMinProfit20Minimum net profit after closing.In account currency.
UseTodayProfitForSniperfalseInclude today's realized profit.May reuse an already-realized profit budget.
UsePartialPrunefalseAllow partial closing of losing positions.Depends on broker/account support.
PartialPruneMinLot0.01Minimum lot size for partial pruning.Smaller positions are closed in full.
PartialPrunePct100Percentage of volume to prune.50 means half before volume normalization.

Lot balance

Add exposure to the lighter side during drawdown.
Processing logic: An |LB order in the same chain contributes to BE/profit/TP but does not change the DCA anchor. It is blocked while trailing is CLOSING and does not open in the same tick as DCA.
InputDefaultMeaningExample / notes
UseLotBalancefalseEnable lot balancing.A hedging account is recommended.
LotBalanceModeADD_TO_CHAINAdd to the same chain or use INDEPENDENT mode.Independent mode uses a magic offset.
LB_LossPctTrigger30Drawdown percentage that triggers balancing.Balance 10,000 with a 3,000 loss = 30%.
LB_LotDiffStart1.0Lot imbalance required to start.BUY 2.0 / SELL 0.8 gives a difference of 1.2.
LB_LotDiffStop0.2Lot imbalance at which balancing stops.Set below the start threshold.
LB_AddLot0.2Volume added per step.Adds to the lighter side.
LB_DelaySeconds10Delay after each balancing order.Reduces clustered entries.
LB_NegLotsPct70Percentage of lots currently losing.Confirmation condition.
LB_LossOrdersCount1Minimum number of losing orders.At least one.
LB_MagicOffset99999Magic offset for Independent mode.Avoid overlap with other EAs.

Trailing (DCA chain)

Virtual trailing relative to chain break-even.
Processing logic: Each BUY/SELL chain has DISARMED → ARMED → CLOSING states. When gain from BE reaches TrailStartPips, the first stop locks TrailFirstSLBufferPips. Each additional TrailStepPips of best gain raises the locked level by exactly one step. Changes in chain count/lot/BE reset trailing. During CLOSING, the EA blocks further entries on that side and retries closing until the chain is empty.
InputDefaultMeaningExample / notes
UseChainTrailingfalseEnable chain trailing.The EA panel shows Trailing above Sniper: Off when disabled; when enabled, B (BUY) and S (SELL) have separate states: Wait=not armed, Active=trailing armed, Closing=closing the chain. Green when a side is Active, orange when a side is Closing. This is trailing status, not the EA's permission to trade.
TrailStartPips150Profit distance from BE required to arm trailing.BUY example from the source guide: Bid ≥ BE + 15p; use the EA's pip convention for TrailStartPips.
TrailStepPips50Stop-tightening step.Moves only in the favorable direction.
TrailFirstSLBufferPips20Initial locked profit distance.Set below TrailStartPips.
TrailOverridesChainTPtrueBypass Chain TP once trailing owns the chain.true: from arming eligibility onward, trailing takes over and ChainTPPips/ChainTPMoney do not close the chain. false: Chain TP can still close before trailing.
UseBrokerTrailSLfalseMirror the virtual stop to broker SL.Provides protection during disconnection.

Close by money

Money-based exits and account/time-level locks.
Processing logic: Money-based exits close the entire managed footprint; Weekend uses server time. Daily limits use realized plus floating P/L and stay latched until the new trading day plus the configured delay.
InputDefaultMeaningExample / notes
MoneyTPAll0Total profit threshold to close all managed positions; 0 disables.In account currency.
MoneySLAll0Total loss threshold to close all managed positions; 0 disables.Must be negative when enabled.

Weekend close

Pre-weekend closing and time-based controls.
Processing logic: Money-based exits close the entire managed footprint; Weekend uses server time. Daily limits use realized plus floating P/L and stay latched until the new trading day plus the configured delay.
InputDefaultMeaningExample / notes
UseWeekendClosefalseClose before the weekend.If managed positions remain, sends one push notification and audible Alert within the 10 minutes before WeekendCloseTime in server time. Checked in both OnTimer and OnTick.
WeekendCloseTime20:45:00Closing time in server time.Set sufficiently before market close. The alert window starts 10 minutes before WeekendCloseTime.

Daily profit target

Daily profit/loss limits in money or as a percentage of account balance when the trading day is initialized.
Processing logic: Money-based exits close the entire managed footprint; Weekend uses server time. Daily limits use realized plus floating P/L and stay latched until the new trading day plus the configured delay. Percentage limits use the saved starting daily balance, not intraday equity or balance changes. On first attachment, use balance at initialization; restarts within the day reuse the saved base. A new base is fixed on the next server-time trading day after NewDayDelayMinutes. P/L is realized profit for the day plus floating P/L of EA-managed trades on the symbol under the current MagicNumber rules, not total P/L from every EA/symbol in the account. Reaching a limit closes orders through the existing protection flow and locks Entry/DCA until the new day; unfinished closes continue to be processed. With money and percentage thresholds enabled together, whichever is reached first triggers. If the base balance is nonpositive, percentage thresholds do not apply, but monetary limits remain active.
InputDefaultMeaningExample / notes
DailyProfitTarget0Daily monetary profit target.0 disables. If percentage limits are also enabled, the first money or percentage threshold reached triggers.
DailyLossLimit0Daily monetary loss limit.Must be negative or 0. If percentage limits are also enabled, the first money or percentage threshold reached triggers.
DailyProfitTargetPct0Daily TP as a percentage of starting daily balance; positive value, 0 disables.With a 1,000 USD base, 5 means +50 USD. If DailyProfitTarget=30, the EA stops already at +30 USD.
DailyLossLimitPct0Daily SL as a percentage of starting daily balance; positive value, 0 disables.With a 1,000 USD base, 3 means -30 USD. Unlike this percentage input, monetary DailyLossLimit must be negative. Values above 100% are allowed; there is no hard 100% cap.
NewDayDelayMinutes120Delay before releasing the daily latch on a new day.Helps avoid rollover.

Stochastic Entry

Independently enabled Entry sources.
Processing logic: Signals read closed candles and cache results on EntryTimeframe. Stochastic >50 gives BUY, <50 gives SELL; RSI >50 gives BUY, <50 gives SELL. Supertrend returns the current trend direction.
InputDefaultMeaningExample / notes
StochKPeriod8Stochastic K period.Fast configuration.
StochDPeriod3Stochastic D period.Fast configuration.
StochSlowing3Stochastic slowing period.Fast configuration.
StochMaMethodSMAStochastic moving-average method.MQL5 enum.
StochPriceLOWHIGHStochastic price field.MQL5 enum.
StochOverbought80Stochastic overbought threshold.Currently not used by Signal_Stoch; Entry direction is compared with 50.
StochOversold20Stochastic oversold threshold.Currently not used by Signal_Stoch; Entry direction is compared with 50.

Stochastic Reverse Entry

Enable EntryStochReverse. BUY: K[2] < oversold threshold and K[1] >= threshold. SELL: K[2] > overbought threshold and K[1] <= threshold. Uses MAIN/K only, not a K/D crossover; the original Stochastic source is unchanged.
Processing logic: Only closed candles are read when a new EntryTimeframe candle appears: [1] is the latest closed bar, [2] the previous bar. Results remain cached until the next EntryTimeframe bar; successfully processed bars are not reread. Missing data, EMPTY_VALUE, or CopyBuffer errors temporarily return 0 without marking the bar processed, so the next tick can retry. AND requires all enabled sources to have the same nonzero direction. OR ignores 0 but returns 0 for simultaneous BUY and SELL. Reverse and BB share EntryTimeframe. Example: Reverse BUY with BB SELL conflicts; BB BUY agrees; with BB=0, only OR can retain BUY. Cache is not consumed after an order: avoiding duplicate evaluation is not a one-order-per-signal limit. Every order still passes OpenOnNewCandle on EntryTimeframe, trend filters, pause/license, limits, and the gateway. OpenOnNewCandle=true limits Entry to one order per EntryTimeframe candle; a later tick may enter once data becomes available if no managed order opened in that candle. DCA does not use Entry-source switches or these two sources; its DcaType and trend filters remain unchanged.
InputDefaultMeaningExample / notes
StochReverseKPeriod8Separate K period, minimum 1.Does not change the existing StochKPeriod.
StochReverseDPeriod3D period passed to iStochastic, minimum 1.D does not participate in BUY/SELL conditions.
StochReverseSlowing3K slowing, minimum 1.Affects the MAIN/K line.
StochReverseMaMethodSMAStochastic Reverse MA method.ENUM_MA_METHOD enum.
StochReversePriceLOWHIGHPrice field for Stochastic Reverse.ENUM_STO_PRICE enum.
StochReverseOversold20Oversold threshold; 0 <= Oversold < Overbought <= 100.19 → 20 gives BUY; 20 → 21 does not.
StochReverseOverbought80Separate overbought threshold.81 → 80 gives SELL; 80 → 79 does not.

Bollinger Bands Entry

Enable EntryBollingerBands. BUY when Close[1] < LowerBand[1]; SELL when Close[1] > UpperBand[1]. Equality with a band gives no signal. Each closed bar outside a band is evaluated anew; no crossover or reentry into the bands is required. Band shift is always 0.
Processing logic: Only closed candles are read when a new EntryTimeframe candle appears: [1] is the latest closed bar, [2] the previous bar. Results remain cached until the next EntryTimeframe bar; successfully processed bars are not reread. Missing data, EMPTY_VALUE, or CopyBuffer errors temporarily return 0 without marking the bar processed, so the next tick can retry. AND requires all enabled sources to have the same nonzero direction. OR ignores 0 but returns 0 for simultaneous BUY and SELL. Reverse and BB share EntryTimeframe. Example: Reverse BUY with BB SELL conflicts; BB BUY agrees; with BB=0, only OR can retain BUY. Cache is not consumed after an order: avoiding duplicate evaluation is not a one-order-per-signal limit. Every order still passes OpenOnNewCandle on EntryTimeframe, trend filters, pause/license, limits, and the gateway. OpenOnNewCandle=true limits Entry to one order per EntryTimeframe candle; a later tick may enter once data becomes available if no managed order opened in that candle. DCA does not use Entry-source switches or these two sources; its DcaType and trend filters remain unchanged.
InputDefaultMeaningExample / notes
BollingerPeriod20Bollinger period, minimum 1.Shift is fixed at 0; there is no shift input.
BollingerDeviation2.0Standard-deviation multiplier; must be finite and >0.Default is 2.0.
BollingerPriceCLOSEApplied price for calculating BB bands.Comparison always uses Close[1], even with PRICE_TYPICAL selected for band calculation.

RSI Entry

Independently enabled Entry sources.
Processing logic: Signals read closed candles and cache results on EntryTimeframe. Stochastic >50 gives BUY, <50 gives SELL; RSI >50 gives BUY, <50 gives SELL. Supertrend returns the current trend direction.
InputDefaultMeaningExample / notes
RsiPeriod14RSI period.Uses closed candles.
RsiPriceCLOSERSI applied price.Uses closed candles.
RsiOverbought70RSI overbought threshold.Currently not used by Signal_RSI; Entry direction is compared with 50.
RsiOversold30RSI oversold threshold.Currently not used by Signal_RSI; Entry direction is compared with 50.

Supertrend Entry

Independently enabled Entry sources.
Processing logic: Signals read closed candles and cache results on EntryTimeframe. Stochastic >50 gives BUY, <50 gives SELL; RSI >50 gives BUY, <50 gives SELL. Supertrend returns the current trend direction.
InputDefaultMeaningExample / notes
SupertrendAtrPeriod12Supertrend ATR period.A larger value smooths the calculation.
SupertrendMultiplier3.5Band width multiplier.A larger value reduces direction flips.

CHoCH Structure Entry

CHoCH Entry uses the same detector as chart drawings on EntryTimeframe.
Processing logic: Enable EntryCHoCH to select CHoCH. Other source switches combine through AND/OR; Candle participates when EntryCandle or UseCandleSignalForEntry is true. Swings are confirmed after N closed bars on each side; equal highs/lows are not strict swings. The first swing is H/L; later swings are HH/HL/LH/LL. In bearish LH+LL structure, a close above the protected LH creates Bullish CHoCH. In bullish HH+HL structure, a close below the protected HL creates Bearish CHoCH. A wick through the level or a close exactly at it is not a break. A same-direction break is BOS. After CHoCH, a new structural pair is required before the next event. Each level fires once. Entry is evaluated from the first tick of the next candle; the signal remains valid through that candle if filters initially block it. It can enter when same-side positions already exist. Entry lots, First SL/TP, Magic, and existing limits still apply. Each signal submits at most one request; once submitted, even if rejected or pending at the broker, it is not resubmitted. While CHoCH is pending, the Engine does not open accompanying Candle/Bias/DCA orders; afterward DCA retains its own price steps. Experts logs explain blocked entries. This EA version does not include Smart Grid/CHoCH Cooldown. CHoCH arrows are signals; Entry labels come only from executed deals at their actual time/price. Restarting or missing multiple candles only reconstructs historical drawings, without replaying trades. Objects use a dedicated prefix, with at most 3,000 objects and 3,000 recent deals within the history window.
InputDefaultMeaningExample / notes
ChochSwingLookback5Closed candles required on each side to confirm a swing; 1–100.N=5 means the swing is known only after the fifth candle on the right closes.
ChochHistoryBars500Closed candles used to build structure, independent of displayed candle count.From 2 × lookback + 4 to 5000. Keep enough history to identify structure.
ShowChochSwingstrueShow swing markers and structure labels.Disabling only hides drawings; it does not disable selected CHoCH Entry.
ShowChochBOStrueShow continuation BOS segments.Horizontal segments end at the breakout candle; no infinite rays.
ShowChochSignalstrueShow CHoCH lines and BUY/SELL signal arrows.BUY below the confirmation candle, SELL above. An arrow does not mean an order exists.
ShowChochEntriestrueShow Entry BUY/SELL from executed CHoCH deals.Blocked or rejected orders have no Entry label. Partial fills show each deal.
ChochSwingHighColorclrOrangeSwing High marker and label color.Default Orange.
ChochSwingLowColorclrDodgerBlueSwing Low marker and label color.Default DodgerBlue.
ChochBullishColorclrBlueBUY structure, signal, and entry color.Default Blue.
ChochBearishColorclrRedSELL structure, signal, and entry color.Default Red.

Confirmed candle signal

Closed-candle patterns combined with trend, support/resistance, confirmation, ATR, and scoring.
Processing logic: Patterns are detected on EntryTimeframe. Combined entries with matching SelfAwareTrend and UseSelfAwareAutoSLTP=true prioritize SAT SL/TP. For other Candle entries, FirstSLPips>0 always takes priority. With FirstSLPips=0 and UseAutoCandleStopLoss=true, use structural SL on TrendTimeframe; with FirstSLPips=0 and Auto SL=false, submit SL=0. |CS contributes to shared BE/profit/TP but not DCA progression. When UseCandleSignalForEntry=false and Candle is selected for Entry, orders use Entry lots without |CS. When true, Engine_CandleLot prioritizes the active time-window lot; otherwise it uses CandleSignalLot and its zero fallback. Lot caps still apply.
InputDefaultMeaningExample / notes
UseCandleSignaltrueAllow Candle module initialization and analysis; not a master switch blocking Candle trades.Even when false, analysis and entries may occur if EntryCandle or UseCandleSignalForEntry is enabled. NotifyCandleSignal/NotifyCandleSignalDetection can also keep analysis active. To stop Candle trading, set both EntryCandle=false and UseCandleSignalForEntry=false. Enabling UseCandleSignal alone does not authorize entries.
UseCandleSignalForEntryfalsetrue uses Candle lots and allows additional Candle orders in a chain; false uses Entry lots when EntryCandle=true.true prioritizes Candle logic/lots whether EntryCandle is on or off, adding only one Candle source to AND/OR. false enters from Candle only if EntryCandle=true, using Entry lots with no additional Candle entries. Both false leaves only analysis/display if the corresponding options are enabled.
NotifyCandleSignalfalseSend Push and Alert after a Candle order opens successfully.No notification for drawings alone or signals blocked by the combiner/trading gates. Uses the order's actual Entry/SL/TP.
NotifyCandleSignalDetectionfalseSend Push and Alert when a valid Candle signal is detected and drawn.Independent of NotifyCandleSignal. Both enabled gives a SIGNAL notification on detection and an ORDER notification if the trade subsequently opens.
CandleSignalLot0.2Candle lot size; 0 uses InitialLots.Capped by MaxLots; the first Candle order uses First TP/SL.
UseAutoCandleStopLossfalseAutomatically set a separate structural SL for Candle orders.Used only when FirstSLPips=0. With FirstSLPips>0, fixed SL always has priority over Auto SL.
CandleStopLossATRBuffer0.25ATR(14) buffer beyond structural invalidation.BUY: SL = lowest low − buffer × ATR; SELL: SL = highest high + buffer × ATR. The source guide notes 0.10–0.30 can help reduce wick-triggered stops.
CandleStopLossSwingLookback12TrendTimeframe candles used to find the nearest confirmed swing.Combines the signal cluster boundary (up to 3 candles) with the nearest swing low/high, choosing the farther protective boundary. Minimum 3.
MinConfidenceScore70Minimum signal score.35 pattern + 25 support/resistance + 20 trend + 15 confirmation + 5 volume.

Self-Aware Trend Entry

Draw the SelfAwareTrend line and show SL, TP1, TP2, and TP3 for open SelfAware Auto SL/TP positions. Configure trend colors and automatic risk levels. This is an adaptive SuperTrend reversal source, not a SATS dashboard.
Processing logic: Drawings use the same formula and EntryTimeframe presets, but maintain independent state and neither generate nor consume trading signals. TP/SL level display does not place or modify orders, is independent of ShowSelfAwareTrend, and continues showing older Auto trades after the Entry source is disabled. Trend colors apply when ShowSelfAwareTrend=true and do not change entries or SL/TP. SelfAwareTrend auto presets: up to M5, Scalping (ATR 10, ER 14, band 1.5, SL 1.0 ATR); above M5 through H4, Default (14, 20, 2.0, 1.5); above H4, Swing (21, 30, 2.5, 2.0). Source is Close; default TQI combines ER/volume/structure/momentum, effective ATR, and smoothed asymmetric bands. BUY/SELL occurs only on a reversal in the latest closed candle. There is no score gate, self-learning, or trading timeout. Insufficient data waits and retries. AND/OR and existing Trend, Bias, Zone, time, spread, lot, limit, and DCA rules remain in force. Each SAT signal can attempt submission at most three times, at least five seconds apart within the current Entry candle. Retry only before broker submission or after a clear temporary rejection (requote, changed/unavailable prices, too many requests, or processing lock). Filled, pending, partially filled, or uncertain results such as timeout/disconnection remain locked against duplicates, including after restart. Unmet filters may wait within the same Entry candle. SAT does not add entries to an existing chain except under the current CHoCH rules.
InputDefaultMeaningExample / notes
ShowSelfAwareTrendfalseToggle the SelfAwareTrend chart line independently of EntrySelfAwareTrend.true draws up to 300 recent closed EntryTimeframe candles, colored by SelfAwareBullColor/SelfAwareBearColor (green up, red down by default), with gaps at reversals. No current-candle values are drawn. Timer updates continue while paused if the license is valid; missing data waits and retries. false or EA removal deletes the module's line segments. Can be used for observation without SAT Entry; chart timeframe does not change presets unless EntryTimeframe=CURRENT.
ShowSelfAwareTPSLLevelsfalseShow horizontal SL/TP lines and price labels for open AwareTrend Auto trades.Red SL is the current broker SL and follows trailing. Green TP1/TP2/TP3 share the partial-close cache, using actual volume-weighted fill price and initial SL restored from history. All three remain for reference after partial closure. Labels include ticket and BUY/SELL. Timer updates roughly every second with a valid license; lines are deleted on close, input disable, or EA removal. No hypothetical levels without a position; missing history waits rather than guessing TP. Does not affect MT5 Show trade levels.
SelfAwareBullColorclrLimeGreenSelfAwareTrend line color in an uptrend.Default LimeGreen; choose in Inputs.
SelfAwareBearColorclrTomatoSelfAwareTrend line color in a downtrend.Default Tomato; use the Bull color for a single-color line.
UseSelfAwareAutoSLTPfalseFor entries with matching SAT, replace FirstSLPips/FirstTPPips and Auto Candle SL with pivot ± effective ATR SL; TP1=1R, TP2=2R, TP3=3R.BUY SL is below both pivot low minus buffer and signal Close minus buffer; SELL is symmetric. At submission, provisional SL/TP3 uses Ask/Bid. After fills, R is measured from volume-weighted fill price to the initial SL in order history. TP1/TP2/TP3 are normalized to tick size; broker TP3 is synchronized and retried if modification is temporarily disallowed. Additional partial fills update average price and initial volume; trailing or partial closures do not change R. Skip entry if price has passed SL. SL and TP3 are sent to the broker; TP1/TP2 require the EA running. Each target aims to close one-third of initial volume, rounded to lot step, with the remainder at TP3. Example: 0.04 lots and 0.01 step gives 0.01 / 0.01 / 0.02. Volumes too small to split carry over to later targets. Fill price, initial SL, targets, and initial volume share a cache for closing/drawing; history is reread only after trade/volume changes or when unavailable. Progress is restored from deal history after restart; existing Auto trades remain managed even after the input is disabled. Requires a hedging account. SL does not automatically move to break-even. Existing trailing, chain TP, money exits, and pruning can close earlier. Gaps may close multiple portions at current prices, with no guarantee of exact 1R/2R/3R fills. Applies only to combined entries with SAT, not DCA or separate Bias/Candle entries.

EMA trend filter

Filter Entry/DCA/Candle using two EMAs.
Processing logic: Inside the time window, EMA1>EMA2 allows only BUY and EMA1<EMA2 only SELL for Entry, Candle, and DCA once the filtering threshold is reached. Outside the window, the filter is inactive.
InputDefaultMeaningExample / notes
UseEmaFiltertrueEnable the shared EMA filter.Candle has no separate EMA filter.
ShowEmaOnChartfalseDraw EMA 1 and EMA 2 in the main price window.Visible only when chart timeframe matches TrendTimeframe. Changing away removes them; changing back redraws them.
EmaPeriod134Manual fast EMA period; defaults come from the current configuration.Directly effective only when TrendStrategySuggestion=NONE.
EmaPeriod289Manual slow EMA period; defaults come from the current configuration.Directly effective only when TrendStrategySuggestion=NONE.
EmaPeriod1ColorclrDodgerBlueEMA 1 line color.Color does not affect trend logic; change it in Inputs.
EmaPeriod2ColorclrOrangeRedEMA 2 line color.Color does not affect trend logic; change it in Inputs.
UseEmaTimeWindowfalseRestrict the EMA filter to a time window.false applies it at all times.
EmaWindowStart11:00:00Local-time EMA window start.Neutral outside the window.
EmaWindowEnd21:00:00Local-time EMA window end.Neutral outside the window.

MACD trend filter

Filter Entry/DCA/Candle using MACD main/signal.
Processing logic: Main>signal permits only BUY; main<signal only SELL. FlipGuard removes small oscillations around crossovers.
InputDefaultMeaningExample / notes
UseMacdFiltertrueEnable the shared MACD filter.Can be combined with EMA.
ShowMacdOnChartfalseShow MACD in a separate chart subwindow.Visible only when chart timeframe matches TrendTimeframe. Changing away removes it; changing back redraws it.
MacdFastEma12Manual MACD fast EMA period; BALANCED defaults are 12/26/9.Directly effective in NONE; Fast must be less than Slow.
MacdSlowEma26Manual MACD slow EMA period; BALANCED defaults are 12/26/9.Directly effective in NONE; Fast must be less than Slow.
MacdSignalSma9Manual MACD signal SMA period; BALANCED defaults are 12/26/9.Directly effective in NONE; Fast must be less than Slow.
MacdPriceCLOSEApplied price.Uses closing price.
MacdFlipGuard0Minimum main-signal distance.0 disables the guard.
UseMacdTimeWindowfalseRestrict MACD to a time window.Neutral outside the window.
MacdWindowStart11:00:00Local-time MACD window start.Can differ from the EMA window.
MacdWindowEnd21:00:00Local-time MACD window end.Can differ from the EMA window.

Additional trend filters

ADX + DI, Market Structure, HTF Alignment, and additional trend filters.
Processing logic: Each filter is enabled separately and returns BUY (+1), SELL (-1), or NEUTRAL (0). Market Structure distinguishes HH/HL, LH/LL, BOS, and CHOCH; CHOCH returns the new reversal direction. VWAP and Volume Profile use closed TrendTimeframe candles. Volume Profile uses broker tick volume, not centralized market-wide volume. Disabled filters participate in neither CONSENSUS nor SCORE.
InputDefaultMeaningExample / notes
UseAdxFiltertrueEnable ADX + DI on TrendTimeframe.ADX below the threshold returns neutral; +DI>-DI gives BUY and -DI>+DI gives SELL.
AdxPeriod14Manual ADX period; BALANCED defaults are 14/22 for period/strength.The source guide describes strength thresholds around 20–25 for filtering weak markets.
AdxMinStrength22.0Manual minimum ADX strength; BALANCED period/strength defaults are 14/22.Thresholds around 20–25 are described for filtering weak markets.
UseMarketStructureTrendFiltertrueEnable HH/HL or LH/LL filtering.The latest two swing highs and swing lows must confirm the same direction.
MarketStructureLookback80Manual structure lookback; BALANCED defaults are 80/3 for lookback/strength.Higher swing strength reduces noise but responds more slowly.
MarketStructureSwingStrength3Manual swing strength; BALANCED defaults are 80/3 for lookback/strength.Higher strength reduces noise but responds more slowly.
UseHtfAlignmentFiltertrueEnable EMA confirmation on HigherTimeframe.Fast>Slow gives BUY; Fast<Slow gives SELL.
HtfAlignmentFastEma50Manual fast HTF EMA; BALANCED defaults are 50/200.Independent of Bias Filter EMAs.
HtfAlignmentSlowEma200Manual slow HTF EMA; BALANCED defaults are 50/200.Independent of Bias Filter EMAs.
UseVwapTrendFiltertrueEnable VWAP Trend Filter on TrendTimeframe.BUY requires a close above rolling VWAP and sufficient upward VWAP slope; SELL uses the opposite conditions.
VwapLookbackBars50Closed candles used for rolling VWAP.VWAP uses typical price × tick volume; a longer lookback is steadier but slower.
VwapMinSlopeATR0.02Minimum VWAP slope as a fraction of ATR.Filters out nearly flat VWAP; 0 allows any slope with the correct sign.
UseVolumeProfileBiastrueEnable Volume Profile Bias using broker tick volume.Compares POC in the recent half of the period with the earlier half, and price with the current POC.
VolumeProfileLookbackBars120Total closed candles in Volume Profile.The EA splits the lookback in half to determine whether POC is shifting up or down.
VolumeProfileBins48Number of price buckets for allocating tick volume.10–200; more bins give detail but increase sensitivity and computation.

Higher timeframe Bias Filter

Top-down Bias and points of interest from closed HigherTimeframe candles. Entry filtering is separate from opening orders at Key Levels.
Processing logic: UseBiasFilter enables Bias/Key Level analysis. UseBiasFilterAsTrendFilter decides whether results gate Entry/Candle/DCA; UseBiasFilterForEntry controls independent |BF orders at Key Levels. Levels are recalculated only after a new HigherTimeframe candle closes. Rectangles are translucent; overlapping green and red/orange regions can look purple. This is overlap/conflict, not a separate signal. UseTrendFilterForBiasEntry adds a separate HigherTimeframe trend confirmation for standard Entry, Candle, and Bias. It uses SCORE when UseTrendFilterScoring=true, otherwise CONSENSUS. Bias does not score itself in the HTF score, avoiding a loop. |BF contributes to shared BE/profit/TP but does not change DCA progression. Automatic mode uses broker server days and resets on the first tick of a new day. Reading D1 High-Low lets it reactivate after restart if the current day already exceeded the threshold. If D1 data is unavailable, it does not newly activate and retries on later ticks; a state already ON stays ON until the day ends. Applies to standard Entry/Candle/Bias, not DCA. The dashboard shows AUTO ON/OFF.
InputDefaultMeaningExample / notes
UseBiasFiltertrueEnable Bias and Key Level analysis, panel, and rectangles.false disables analysis, hides the panel/rectangles, and disables both the trend gate and |BF orders.
UseBiasFilterAsTrendFilterfalseUse Bias as a gate for Entry, Candle, and DCA.false removes Bias/Key Level checks from these entries while keeping the panel and rectangles visible.
UseBiasFilterForEntryfalseAllow Bias to open orders at Key Levels.Requires UseBiasFilter=true; at most one order per direction per closed HTF candle.
UseTrendFilterForBiasEntryfalseAdd HigherTimeframe trend filtering to Entry, Candle, and Bias entries.ON requires both ordinary TrendTimeframe and HTF trend checks; DCA does not use this HTF gate. The Bias panel shows direction and SCORE/MIN. With UseAutoTrendFilterForBiasEntry=true, automatic mode controls the actual state without rewriting this manual input.
UseAutoTrendFilterForBiasEntryfalseAutomatically control the HTF trend filter from the symbol's daily range.true overrides manual control by UseTrendFilterForBiasEntry: OFF at the start of the day, ON for the rest of the day once High-Low exceeds the threshold. false uses the manual switch.
BiasTrendDailyRangeThreshold100.0Current D1 High-Low threshold in direct price units, not pips/points.With threshold 100: Low=3300, High=3400 does not enable it; High=3400.01 does. Must be >0.
BiasFilterLot0.2Separate Bias order lot size.0 uses InitialLots; positive values are normalized/capped by broker rules and MaxLots.
BiasLookbackBars150Closed HTF candles used for analysis.Does not use shift 0.
SwingStrengthBars3Bars required on each side to confirm a swing.Higher values detect larger/slower swings.
MaxKeyLevels6Number of highest-scoring levels retained.Range 1–20.
BiasFastEMAPeriod50Separate fast EMA for HTF Bias.Fast must be less than Slow.
BiasSlowEMAPeriod200Separate slow EMA for HTF Bias.Fast must be less than Slow.
ShowKeyLevelsOnCharttrueDraw Key Level rectangles.Default colors: support green, resistance deep pink, bullish FVG blue, bearish FVG orange, liquidity gold, BUY green, SELL red. All are configurable through color inputs.
ShowBiasSupporttrueShow/hide Support on the chart and Bias panel.Display only; levels still participate in trading logic.
BiasSupportColorclrSeaGreenSupport zone color.Change directly in Inputs.
ShowBiasResistancetrueShow/hide Resistance on the chart and Bias panel.Uses BiasResistanceColor when enabled.
BiasResistanceColorclrDeepPinkResistance zone color.Default deep pink.
ShowBiasBullishFvgtrueShow/hide Bullish FVG.Uses BiasBullishFvgColor.
BiasBullishFvgColorclrDodgerBlueBullish FVG color.Display only.
ShowBiasBearishFvgtrueShow/hide Bearish FVG.Uses BiasBearishFvgColor.
BiasBearishFvgColorclrOrangeBearish FVG color.Display only.
ShowBiasLiquiditytrueShow/hide Liquidity High/Low.Both use BiasLiquidityColor.
BiasLiquidityColorclrGoldLiquidity High/Low color.Shared by both liquidity types.
ShowBiasBuyZonetrueShow/hide bullish OB, Fibonacci discount, and other BUY zones.Uses BiasBuyZoneColor.
BiasBuyZoneColorclrSeaGreenColor of other BUY zones.Bullish OB, Fibonacci discount, and other BUY levels.
ShowBiasSellZonetrueShow/hide bearish OB, Fibonacci premium, and other SELL zones.Uses BiasSellZoneColor.
BiasSellZoneColorclrTomatoColor of other SELL zones.Bearish OB, Fibonacci premium, and other SELL levels.

Zone Cycle filter

Restrict Entry using four manual or AI zone boundaries.
Processing logic: A zero boundary is unrestricted; even a single nonzero boundary has logic and a line. Disabling Zone or an API failure clears the zones and fails open, without reusing stale data.
InputDefaultMeaningExample / notes
UseZoneCyclefalseEnable the zone filter.false removes zone lines.
UseZoneCycleByAIfalseChoose AI or manual zones.Manual lines can be dragged.
BuyZoneUpper0Upper BUY boundary.0 leaves this boundary unrestricted.
BuyZoneLower0Lower BUY boundary.0 leaves this boundary unrestricted.
SellZoneUpper0Upper SELL boundary.Only the latest line is retained.
SellZoneLower0Lower SELL boundary.Only the latest line is retained.
ZoneAiApiKeyemptyGemini API key.Do not share presets containing the key.
ZoneAiModelgemini-3.6-flashAPI model identifier.An incorrect model may return 404.
ZoneAiTimeoutMs30000Timeout in milliseconds.Increase for slow networks.
ZoneAiBarCount48HTF candles sent to AI.More candles increase payload size.

New Cycle (disable entries at specific time)

Scheduled New Cycle locks and pending-order control on the chart symbol.
Processing logic: The EA scans pending orders in OnTick/OnTimer, identifies commands by both order type and price, executes them, then deletes the pending order. New Cycle OFF blocks only new chains; existing chains remain managed and can receive DCA. Stop Buy/Sell blocks all additional orders in the corresponding direction. State persists across restarts.
InputDefaultMeaningExample / notes
UseNewCycletrueEnable the scheduled cycle lock.false ignores the schedule.
NewCycleDayFRIDAYDay to lock new cycles.Uses server time.
NewCycleOffTime17:00:00Time to lock new cycles.HH:MM:SS.

Time limit (local PC time)

Entry opening windows in local PC time.
Processing logic: Entry is within hours if it falls inside at least one enabled window. AllowDcaOutsideHours may allow DCA management of an existing chain outside those windows.
InputDefaultMeaningExample / notes
UseTimeLimitfalseEnable time limits.false allows all hours.
UseTimeWindow1trueEnable window 1.Can cross midnight.
Window1Start01:00:00Window 1 start.Local PC time, HH:MM:SS.
Window1End11:30:00Window 1 end.Local PC time, HH:MM:SS.
UseTimeWindow2falseEnable window 2.Can cross midnight.
Window2Start14:30:00Window 2 start.Local PC time, HH:MM:SS.
Window2End18:30:00Window 2 end.Local PC time, HH:MM:SS.
UseTimeWindow3falseEnable window 3.Can cross midnight.
Window3Start20:30:00Window 3 start.Local PC time, HH:MM:SS.
Window3End23:30:00Window 3 end.Local PC time, HH:MM:SS.
UseTimeWindow4falseEnable window 4.Can cross midnight.
Window4Start02:30:00Window 4 start.Local PC time, HH:MM:SS.
Window4End05:30:00Window 4 end.Local PC time, HH:MM:SS.
AllowDcaOutsideHourstrueAllow DCA outside trading hours.Does not open new chains.

Trade sessions

Session information on the dashboard.
Processing logic: Does not replace Time Limit. Real sessions use UTC/DST; custom sessions use server time.
InputDefaultMeaningExample / notes
UseSessionInfotrueEnable session information.Disabling reduces UI information.
UseRealMarketSessionstrueUse real sessions with daylight-saving adjustments.false uses custom hours.
TokyoStartHour2Custom Tokyo start hour in server time.Used only when UseRealMarketSessions=false.
LondonStartHour9Custom London start hour in server time.Used only when UseRealMarketSessions=false.
NewYorkStartHour14Custom NewYork start hour in server time.Used only when UseRealMarketSessions=false.
SydneyStartHour21Custom Sydney start hour in server time.Used only when UseRealMarketSessions=false.

Remote control (pending orders)

Control the EA with pending orders on the chart symbol and scheduled New Cycle locks.
Processing logic: The EA scans pending orders in OnTick/OnTimer, identifies commands by both order type and price, executes them, then deletes the pending order. New Cycle OFF blocks only new chains; existing chains remain managed and can receive DCA. Stop Buy/Sell blocks all additional orders in the corresponding direction. State persists across restarts.
InputDefaultMeaningExample / notes
RemotePausePrice999999BUY STOP at this price pauses the EA.The EA recognizes and deletes the pending order.
RemoteResumePrice666666BUY STOP at this price resumes the EA.Test on demo.
RemoteNewCyclePrice888888BUY STOP disables New Cycle; SELL LIMIT enables it.OFF blocks new chains; ON permits new chains again.
RemoteStopSidePrice555555BUY STOP means Stop Buy; SELL LIMIT means Stop Sell.Stop Buy switches to Sell Only; Stop Sell switches to Buy Only. Use the direction buttons on the panel to change the mode back.

Debug

Diagnostic logging.
Processing logic: Important events are always logged. Enable Debug to see why signals or gates reject an entry.
InputDefaultMeaningExample / notes
DebugLogEnabledfalseEnable MatsDebug.Enable while investigating issues.