Conventions: 0 usually disables a threshold; time uses
HH:MM:SS; money is in account currency; lot sizes are rounded down to the broker volume step (including 0.001). If the capped lot is below the minimum, the order is skipped rather than rounded up. Chain management includes all matching positions, without the former 100-position limit per side. Entry/DCA/Candle/Bias/Balance types are stored by account, broker and position/order identifier for restart recovery; older trades use available history/comments.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. Invalid licenses block new orders, including DCA/Balance; closing, reducing, modifying SL/TP and position protection remain active, including after API errors at startup.1. 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.
| Input | Default | Meaning | Example / notes |
|---|---|---|---|
| MagicNumber | 0 | EA magic number; 0 adopts all positions on the symbol. | Saved state is isolated by server, account, magic and symbol. Old control flags without an account owner are not imported: recheck Pause, New Cycle and trailing after the first upgrade. Account-scoped Sniper progression is retained; recent entry timing is recovered from broker history. Close All (Ctrl+1) persists a new-entry lock before closing owned positions, including independent Balance. It continues reconciling outstanding market requests and closes late-filled positions too. Both BUY/SELL remain in closing mode even when temporarily flat. It resets Awaiting Broker and releases the lock only after broker-confirmed final order state, complete fill visibility and no remaining scoped positions, market orders or close requests. Disconnection, unavailable history or incomplete snapshots retain the lock; no timeout unlock is used. Status shows Closing All / Broker settlement. Normal trading conditions are checked again after cleanup. Close Buy/Close Sell retain their existing scoped behavior. For prolonged broker waits, a failed ticket lookup triggers history synchronization at most once every 5 seconds; missing position identifiers are recovered from deals. Rejected orders are not treated as filled even when the broker reports zero remaining volume. Orphan Bias reservation metadata is cleared only while connected, without an open intent or pending ticket and without a working market request, preserving traded-zone usage. [GATEWAY][Awaiting] logs the ticket and reason on change or once per minute; [GATEWAY][Recovery] reports successful reconciliation/cleanup. History synchronization never unlocks solely because time elapsed. |
| OrderComment | MATSEA | User prefix inside the broker order comment. | EA prepends a #number| request marker for timeout reconciliation. Comments are limited to 31 characters: the user prefix is shortened to preserve direction, CS/BF/LB/DCA, LR reset, CHoCH and SA3 tags. Auxiliary source labels may be shortened when necessary; history and metadata retain order classification. |
| TradeMode | MATS_BUY_AND_SELL | Allow 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. |
2. General
Lot size and protection for the first order in a chain.
Processing logic: New-chain Candle uses FirstTPPips; added CS uses its pattern TP even when FirstTPPips=0. Both share the fixed-SL / structural-SL / SL=0 priority; CandleSignalLot only changes volume. See the Auto SAT overrides below.
| Input | Default | Meaning | Example / notes |
|---|---|---|---|
| UIScale | 0.0 | Dashboard and Bias panel scale relative to the chart area; 0 selects automatic scaling within 0.75–1.50. Positive values set a manual scale, clamped to 0.75–2.00. | Example: 1 keeps the original size; 1.25 enlarges by 25%. Font sizes compensate for Windows DPI to stay proportional to panels. Updates when the chart is resized. Very small charts may clip; use the panel collapse buttons. |
| InitialLots | 0.04 | Base lot for regular Entry and DCA outside the active lot window. | Inside an enabled window, LotTimeNewLots replaces this effective value. Candle/Bias use their own settings; later ADD orders and retained pruning baselines continue from confirmed lots. |
| FirstTPPips | 200 | Broker TP for the first order in a chain; 0 disables that first-order TP. | New-chain Candle uses FirstTPPips. Added CS uses a cached pattern target independently of FirstTPPips: extend the pattern low/high to the relevant S/R, add a 0.25 Candle ATR buffer as a reference boundary, then target detection price ± 2 times the distance to that boundary. This reference computes TP only; it does not place an SL or apply structural SL ATR limits. Missing, invalid or crossed model TP blocks only the added Candle entry. Opposing S/R may shorten TP. Candle has no minimum R:R entry gate. Display the final ratio when actual SL and TP both exist, otherwise RR=N/A. Keep the factor of 2 in the model TP formula. SAT Auto may override first-order TP with TP3=3R. |
| FirstSLPips | 0 | Fixed SL for the first order and additional CS orders; 0 disables fixed SL. | A positive value takes priority and does not require pattern SL or structural ATR limits. With 0, select structural SL only if Auto Candle SL is enabled; with both disabled, submit SL=0 and report RR=N/A. SAT Auto takes priority for matching combined entries. Final R:R uses actual broker-normalized SL/TP for information only; Candle has no minimum ratio gate. |
| OpenOnNewCandle | true | Restrict opens by candle using the shared fill clock. | Entry and Candle use the latest managed fill. Candle checks CandleTimeframe; ordinary Entry checks EntryTimeframe. OR has no independent Candle clock. |
3. Timeframes
Timeframes for signals, trends, Zone AI, and the Bias Filter.
EntryCandle includes Candle in the shared AND/OR combination as in v1.98. OR requires at least one nonzero signal and no opposing direction; AND requires every selected source to be nonzero and aligned. Priority is pending CHoCH, otherwise BF, combined first Entry, then Candle joining a chain. No independent Candle companion follows an ordinary Entry in the same engine pass. Candle shares the managed-fill clock for OpenOnNewCandle/OpenDelaySeconds. A pattern rejected by spread or trading hours is discarded until a new Candle bar; technical data failures remain retryable. Confidence uses EMA, MACD and structure on TrendTimeframe as in v1.98; opposing nonzero directions make the context neutral and remove the 20 trend points. CandleTrendTimeframe still controls the Candle permission filter, not those confidence points. A BF/Candle chain-add may have a DCA companion only when PreventSpecialEntryDcaSameTick permits and the prior request has settled.
Processing logic: EntryTimeframe drives normal Entry/DCA timing; CandleTimeframe drives pattern/confirmation and Candle ATR. Regular Entry/DCA read trend on TrendTimeframe. Dedicated Candle (EntryCandle=true) reads closed-bar EMA/MACD/ADX/structure/VWAP/profile on CandleTrendTimeframe (default M5), sharing settings, weights and TrendFilterMode. HTF Alignment keeps HigherTimeframe; the separate BF trend gate also uses HigherTimeframe. Structural Auto Candle SL still uses TrendTimeframe. See group 25.1 for Candle trend gating and UI behavior.
| Input | Default | Meaning | Example / notes |
|---|---|---|---|
| EntryTimeframe | PERIOD_M1 | Shared 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. |
| CandleTimeframe | PERIOD_M5 | Independent timeframe for Candle patterns, confirmation and ATR. | Default M5. Separate from CandleTrendTimeframe. OpenOnNewCandle follows this pattern timeframe for Candle. Pattern M5 with trend M15 shows Candle M5 (BUY); tooltip identifies Trend M15. Structural Auto SL retains TrendTimeframe. |
| TrendTimeframe | M1 | Trend timeframe for regular Entry/DCA; also retained by structural Auto Candle SL. | Default M1. Candle trend indicators use CandleTrendTimeframe. Adjusting Candle trend does not change the Entry/DCA trend timeframe. |
| CandleTrendTimeframe | M5 | Timeframe for Candle permission filters. | Default M5. Controls the Score/Consensus permission filter only. The 20 confidence trend points use legacy EMA/MACD/structure on TrendTimeframe. |
| HigherTimeframe | PERIOD_H1 | HTF 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. |
4. 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. Entry/DCA use TrendTimeframe; Dedicated Candle (EntryCandle=true) uses its own CandleTrendTimeframe with the same settings, weights and TrendFilterMode. HTF components keep HigherTimeframe.
| Input | Default | Meaning | Example / notes |
|---|---|---|---|
| TrendStrategySuggestion | MATS_TREND_NONE | Trend 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. |
| TrendFilterMode | MATS_TREND_FILTER_SCORE | Shared Score or Consensus combination rule for Entry, Candle, DCA and enabled HTF trend paths. | Score sums direction times weight; BUY needs >= TrendFilterMinScore, SELL <= -TrendFilterMinScore. Consensus requires every enabled filter to agree; neutral/opposite readings block. Entry/DCA use TrendTimeframe, Dedicated Candle (EntryCandle=true) uses CandleTrendTimeframe, HTF components keep HigherTimeframe. |
5. 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.
| Input | Default | Meaning | Example / notes |
|---|---|---|---|
| MaxBuyOrders | 50 | Maximum 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. Managed pending orders also consume lot/count caps. Forecast positions enter global protection but never seed DCA. |
| MaxSellOrders | 50 | Maximum 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. Managed pending orders also consume lot/count caps. Forecast positions enter global protection but never seed DCA. |
| MaxSpreadPips | 30 | Block every new market order above this spread, including Lot Balance. | Gateway checks spread before sending. A valid Candle signal remains available during high spread or outside trading hours so entry can retry when conditions recover within that Candle bar. |
| MaxLots | 1 | Maximum lot size per order. | Broker maximum volume and lot step also apply. Round down; never increase to minimum. A cap or requested lot below minimum skips the order. Example: cap 0.005 and broker minimum 0.01 means no open. |
| OpenDelaySeconds | 1 | Delay between Entry/Candle opens. | Both use the latest managed fill. PreventSpecialEntryDcaSameTick=false waives the delay only for a settled BF/CS chain-add DCA companion; pending-request and complete-exposure checks remain. |
| PreventSpecialEntryDcaSameTick | true | Block a BF/Candle + DCA companion in the same tick. | ON/true (default): block same-tick DCA after BF/Candle. OFF/false: after a BF or CS fill has fully settled, rebuild complete exposure and allow at most one eligible BUY or SELL DCA. Waive OpenDelaySeconds only for this companion; retain DCA timing, spacing, trend, order caps, margin and unresolved-request locks. No companion follows ordinary Entry/CHoCH or a rejected special request, and ordinary Entry never authorizes a Candle/DCA companion. |
| OpenIntentSoftTimeoutSec | 10 | Seconds of stable connection before an order stuck on Awaiting Broker is checked against the account. | Position or entry deal found: treated as filled. Nothing found: released. A broker order still working extends the wait twice, up to three times this value. The clock restarts after a disconnect or EA restart. |
| OpenIntentHardTimeoutSec | 45 | Seconds of stable connection before Awaiting Broker is force-released. | Must be above the soft timeout. The signal stays used so a late fill cannot be doubled, and a working order still blocks new orders. Not applied while Close All is running. |
| OpenIntentCooldownTimeoutSec | 15 | Seconds new orders wait after a timeout release. | 0 disables. Protective closes are not affected. |
| OpenIntentCooldownRejectSec | 3 | Seconds new orders wait after a broker reject, cancel or expiry. | 0 disables. Applies to every chart with the same symbol and magic. |
5.1. Side exposure protection
Freeze additions independently for BUY and SELL while keeping all position management active.
Applying any changed input in group 5.1 fully recalculates BUY/SELL Freeze against the three new trigger thresholds, discarding previous latches and confirmation timers. A current violation freezes; otherwise the side unlocks immediately, including WHEN_FLAT. Example: with 15% loss, raising the limit from 10 to 20 clears LOSS; lowering 20 to 10 triggers LOSS. Changing reset mode or recovery settings also recalculates. Restarting with identical settings retains latches and restarts recovery confirmation. Invalid data or pending opening requests defer recalculation and retry automatically; zero still immediately removes its corresponding cause. The first run without saved settings recalculates once. Apply Inputs/preset to the attached EA; changing source defaults alone is insufficient. Close Buy (Ctrl+2) resets BUY RISK, Close Sell (Ctrl+3) resets SELL RISK, and Close All (Ctrl+1) resets both on click, including recovery timers and saved latch diagnostics. This applies to manual dashboard/shortcut Close actions; the other side is preserved. If processing is busy, the reset request is saved and retried. Closing still requires broker confirmation; remaining unsafe exposure can freeze the side again at the next risk check.
| Input | Default | Meaning | Example / notes |
|---|---|---|---|
| MaxSideFloatingLossPct | 10.0 | Freeze additions when that side loses this percentage of current balance; 0 disables the loss trigger. | Applying any changed input in group 5.1 fully recalculates BUY/SELL Freeze against the three new trigger thresholds, discarding previous latches and confirmation timers. A current violation freezes; otherwise the side unlocks immediately, including WHEN_FLAT. Example: with 15% loss, raising the limit from 10 to 20 clears LOSS; lowering 20 to 10 triggers LOSS. Changing reset mode or recovery settings also recalculates. Restarting with identical settings retains latches and restarts recovery confirmation. Invalid data or pending opening requests defer recalculation and retry automatically; zero still immediately removes its corresponding cause. The first run without saved settings recalculates once. Apply Inputs/preset to the attached EA; changing source defaults alone is insufficient. |
| MaxSideTotalLots | 1.0 | Maximum total managed open lots per side; 0 disables the lot trigger and projected cap. | Applying any changed input in group 5.1 fully recalculates BUY/SELL Freeze against the three new trigger thresholds, discarding previous latches and confirmation timers. A current violation freezes; otherwise the side unlocks immediately, including WHEN_FLAT. Example: with 15% loss, raising the limit from 10 to 20 clears LOSS; lowering 20 to 10 triggers LOSS. Changing reset mode or recovery settings also recalculates. Restarting with identical settings retains latches and restarts recovery confirmation. Invalid data or pending opening requests defer recalculation and retry automatically; zero still immediately removes its corresponding cause. The first run without saved settings recalculates once. Apply Inputs/preset to the attached EA; changing source defaults alone is insufficient. Managed pending orders also consume lot/count caps. Forecast positions enter global protection but never seed DCA. |
| MinMarginLevelForNewOrders | 300.0 | Minimum account margin level (%) for any new position when account margin is in use; 0 disables this trigger. | Applying any changed input in group 5.1 fully recalculates BUY/SELL Freeze against the three new trigger thresholds, discarding previous latches and confirmation timers. A current violation freezes; otherwise the side unlocks immediately, including WHEN_FLAT. Example: with 15% loss, raising the limit from 10 to 20 clears LOSS; lowering 20 to 10 triggers LOSS. Changing reset mode or recovery settings also recalculates. Restarting with identical settings retains latches and restarts recovery confirmation. Invalid data or pending opening requests defer recalculation and retry automatically; zero still immediately removes its corresponding cause. The first run without saved settings recalculates once. Apply Inputs/preset to the attached EA; changing source defaults alone is insufficient. |
| RiskFreezeResetMode | MATS_RISK_WHEN_SAFE | Choose WHEN_FLAT or WHEN_SAFE; default WHEN_SAFE. | Applying any changed input in group 5.1 fully recalculates BUY/SELL Freeze against the three new trigger thresholds, discarding previous latches and confirmation timers. A current violation freezes; otherwise the side unlocks immediately, including WHEN_FLAT. Example: with 15% loss, raising the limit from 10 to 20 clears LOSS; lowering 20 to 10 triggers LOSS. Changing reset mode or recovery settings also recalculates. Restarting with identical settings retains latches and restarts recovery confirmation. Invalid data or pending opening requests defer recalculation and retry automatically; zero still immediately removes its corresponding cause. The first run without saved settings recalculates once. Apply Inputs/preset to the attached EA; changing source defaults alone is insufficient. Close Buy (Ctrl+2) resets BUY RISK, Close Sell (Ctrl+3) resets SELL RISK, and Close All (Ctrl+1) resets both on click, including recovery timers and saved latch diagnostics. This applies to manual dashboard/shortcut Close actions; the other side is preserved. If processing is busy, the reset request is saved and retried. Closing still requires broker confirmation; remaining unsafe exposure can freeze the side again at the next risk check. |
| RiskResumeFloatingLossPct | 8.0 | WHEN_SAFE: maximum recovered side loss as % of current balance. | Applying any changed input in group 5.1 fully recalculates BUY/SELL Freeze against the three new trigger thresholds, discarding previous latches and confirmation timers. A current violation freezes; otherwise the side unlocks immediately, including WHEN_FLAT. Example: with 15% loss, raising the limit from 10 to 20 clears LOSS; lowering 20 to 10 triggers LOSS. Changing reset mode or recovery settings also recalculates. Restarting with identical settings retains latches and restarts recovery confirmation. Invalid data or pending opening requests defer recalculation and retry automatically; zero still immediately removes its corresponding cause. The first run without saved settings recalculates once. Apply Inputs/preset to the attached EA; changing source defaults alone is insufficient. |
| RiskResumeTotalLots | 0.90 | WHEN_SAFE: maximum recovered managed lots per side. | Applying any changed input in group 5.1 fully recalculates BUY/SELL Freeze against the three new trigger thresholds, discarding previous latches and confirmation timers. A current violation freezes; otherwise the side unlocks immediately, including WHEN_FLAT. Example: with 15% loss, raising the limit from 10 to 20 clears LOSS; lowering 20 to 10 triggers LOSS. Changing reset mode or recovery settings also recalculates. Restarting with identical settings retains latches and restarts recovery confirmation. Invalid data or pending opening requests defer recalculation and retry automatically; zero still immediately removes its corresponding cause. The first run without saved settings recalculates once. Apply Inputs/preset to the attached EA; changing source defaults alone is insufficient. |
| RiskResumeMarginLevel | 350.0 | WHEN_SAFE: minimum recovered account margin level (%). | Applying any changed input in group 5.1 fully recalculates BUY/SELL Freeze against the three new trigger thresholds, discarding previous latches and confirmation timers. A current violation freezes; otherwise the side unlocks immediately, including WHEN_FLAT. Example: with 15% loss, raising the limit from 10 to 20 clears LOSS; lowering 20 to 10 triggers LOSS. Changing reset mode or recovery settings also recalculates. Restarting with identical settings retains latches and restarts recovery confirmation. Invalid data or pending opening requests defer recalculation and retry automatically; zero still immediately removes its corresponding cause. The first run without saved settings recalculates once. Apply Inputs/preset to the attached EA; changing source defaults alone is insufficient. |
| RiskResumeConfirmSeconds | 60 | Continuous safe server-time seconds before automatic unlock. | Applying any changed input in group 5.1 fully recalculates BUY/SELL Freeze against the three new trigger thresholds, discarding previous latches and confirmation timers. A current violation freezes; otherwise the side unlocks immediately, including WHEN_FLAT. Example: with 15% loss, raising the limit from 10 to 20 clears LOSS; lowering 20 to 10 triggers LOSS. Changing reset mode or recovery settings also recalculates. Restarting with identical settings retains latches and restarts recovery confirmation. Invalid data or pending opening requests defer recalculation and retry automatically; zero still immediately removes its corresponding cause. The first run without saved settings recalculates once. Apply Inputs/preset to the attached EA; changing source defaults alone is insufficient. |
6. Lots by time window
Override the lot profile during a server-time window.
Processing logic: With UseLotByTime=true inside [LotTimeStart, LotTimeEnd) in server time, LotTimeNewLots replaces the effective InitialLots for regular Entry and DCA, LotTimeCandleLots replaces the Candle base, LotTimeBiasLots replaces the Bias lot, and LotTimeMaxLots replaces the lot cap. Outside the window or with the feature disabled, use the original settings. Overnight windows are supported; switching profiles changes neither input values nor existing position volumes. MULTIPLY without a retained pruning baseline compounds the active base through the current multiplier steps. The first ADD DCA after a regular Entry uses the active base + LotAddFactor; later ADD orders use the latest actual DCA lot. Both modes keep their confirmed baseline after pruning. Example: InitialLots=0.04, LotTimeNewLots=0.02, multiplier=1.15 and one regular Entry give a first DCA of 0.023 inside and 0.046 outside before broker rounding. Zero timed Candle/Bias lots fall back to LotTimeNewLots. Candle confidence increments still apply after selecting the timed base, followed by the active cap and broker volume step. Reaching the cap does not reset the multiplier or chain TP.
| Input | Default | Meaning | Example / notes |
|---|---|---|---|
| UseLotByTime | true | Enable the server-time profile for Entry/DCA base lots, Candle/Bias lots and the lot cap. | Inside [LotTimeStart, LotTimeEnd), use the corresponding LotTime values; outside, restore the original profile. Existing position volumes and retained pruning baselines remain unchanged. |
| LotTimeStart | 11:00:00 | Server-time window start. | The window may cross midnight. |
| LotTimeEnd | 21:00:00 | Server-time window end. | The window may cross midnight. |
| LotTimeNewLots | 0.02 | Effective base lot for regular Entry and DCA inside the window. | Replaces InitialLots for MULTIPLY without a retained baseline and for the first ADD DCA after regular Entry. Later ADD orders and post-prune baselines continue from confirmed lots. UseCurrentDcaLotForEntry still applies to regular Entry. |
| LotTimeCandleLots | 0.1 | Separate Candle Entry lot size inside the window. | 0 uses LotTimeNewLots; the final lot is still capped by LotTimeMaxLots and broker limits. |
| LotTimeBiasLots | 0.1 | Separate Bias Entry lot size inside the window. | 0 uses LotTimeNewLots; outside the window, revert to BiasFilterLot. |
| LotTimeMaxLots | 0.25 | Lot cap for both Entry and DCA inside the window. | LotTimeMaxLots applies inside, MaxLots outside. Reaching the active cap limits volume without restarting lot progression. |
8. 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.
EntryCandle includes Candle in the shared AND/OR combination as in v1.98. OR requires at least one nonzero signal and no opposing direction; AND requires every selected source to be nonzero and aligned. Priority is pending CHoCH, otherwise BF, combined first Entry, then Candle joining a chain. No independent Candle companion follows an ordinary Entry in the same engine pass. Candle shares the managed-fill clock for OpenOnNewCandle/OpenDelaySeconds. A pattern rejected by spread or trading hours is discarded until a new Candle bar; technical data failures remain retryable. Confidence uses EMA, MACD and structure on TrendTimeframe as in v1.98; opposing nonzero directions make the context neutral and remove the 20 trend points. CandleTrendTimeframe still controls the Candle permission filter, not those confidence points. A BF/Candle chain-add may have a DCA companion only when PreventSpecialEntryDcaSameTick permits and the prior request has settled.
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 License positions adjust to the row count. The common timeframe and Signal Combine mode appear together 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. Entry/DCA use TrendTimeframe; Dedicated Candle (EntryCandle=true) uses its own CandleTrendTimeframe with the same settings, weights and TrendFilterMode. HTF components keep HigherTimeframe.
| Input | Default | Meaning | Example / notes |
|---|---|---|---|
| EntryStochastic | false | Enable the existing Stochastic source in AND/OR. | Retains MAIN/K comparison with 50. |
| EntryRSI | false | Enable RSI in AND/OR. | Retains RSI comparison with 50. |
| EntryCCI | true | Enable CCI in the Entry AND/OR combiner. | Closed EntryTimeframe bar: CCI >0 BUY, <0 SELL; zero is neutral. Existing entry filters apply. |
| EntrySupertrend | false | Enable closed-EntryTimeframe Supertrend in AND/OR. | ATR and OHLC all start at shift 1; the live candle does not decide direction. Missing or invalid data retries within the same bar without retaining the previous direction. |
| EntryCandle | true | Enable Candle in the shared signal combination. | EntryCandle includes Candle in the shared AND/OR combination as in v1.98. OR requires at least one nonzero signal and no opposing direction; AND requires every selected source to be nonzero and aligned. Priority is pending CHoCH, otherwise BF, combined first Entry, then Candle joining a chain. No independent Candle companion follows an ordinary Entry in the same engine pass. Candle shares the managed-fill clock for OpenOnNewCandle/OpenDelaySeconds. A pattern rejected by spread or trading hours is discarded until a new Candle bar; technical data failures remain retryable. Confidence uses EMA, MACD and structure on TrendTimeframe as in v1.98; opposing nonzero directions make the context neutral and remove the 20 trend points. CandleTrendTimeframe still controls the Candle permission filter, not those confidence points. A BF/Candle chain-add may have a DCA companion only when PreventSpecialEntryDcaSameTick permits and the prior request has settled. |
| EntryCHoCH | false | Select CHoCH in AND/OR. | A pending CHoCH keeps priority over other Entry sources. If it is blocked or conflicts with the Entry combiner, DCA still checks its independent conditions, including the new-bar tick for STEP_CLOSE. A filled CHoCH entry skips DCA for that tick; an order awaiting broker confirmation keeps openings serialized. |
| EntryStochReverse | false | Select Stochastic Reverse in AND/OR. | Uses EntryTimeframe and separate thresholds; does not replace the existing Stochastic source. |
| EntryBollingerBands | false | Select Bollinger Bands in AND/OR. | Uses EntryTimeframe; a close outside a band is a signal. |
| EntrySelfAwareTrend | false | Enable SelfAwareTrend in the existing Entry combiner. | Independent of EntrySupertrend; preset selection uses EntryTimeframe, not the chart timeframe unless EntryTimeframe=CURRENT. |
| SignalCombine | MATS_SIGNAL_OR | Combine all selected sources, including Candle. | EntryCandle includes Candle in the shared AND/OR combination as in v1.98. OR requires at least one nonzero signal and no opposing direction; AND requires every selected source to be nonzero and aligned. Priority is pending CHoCH, otherwise BF, combined first Entry, then Candle joining a chain. No independent Candle companion follows an ordinary Entry in the same engine pass. Candle shares the managed-fill clock for OpenOnNewCandle/OpenDelaySeconds. A pattern rejected by spread or trading hours is discarded until a new Candle bar; technical data failures remain retryable. Confidence uses EMA, MACD and structure on TrendTimeframe as in v1.98; opposing nonzero directions make the context neutral and remove the 20 trend points. CandleTrendTimeframe still controls the Candle permission filter, not those confidence points. A BF/Candle chain-add may have a DCA companion only when PreventSpecialEntryDcaSameTick permits and the prior request has settled. |
| UseEntryTrendFilter | true | Enable trend gates for regular Entry and Candle orders. | true applies Score/Consensus selected by TrendFilterMode in section 4. false bypasses the main trend, attached HTF trend and Bias trend gate for regular Entry/Candle. Signals, spread, hours, order caps, CS spacing and protection still apply. DCA uses its own UseDcaTrendFilter switch and DcaTrendFilterOrderCount threshold. Independent Bias entries retain their own trend switch. Entry displays SCORE/CONSENSUS/NONE; long headers are shortened with the full text in a tooltip. The DCA row shows ON/OFF | DCA mode | trend mode; UseDcaTrendFilter=false, DcaTrendFilterOrderCount=0 or disabled DCA displays NONE. This reflects the configured filter; DCA activation thresholds are still evaluated per side. Dedicated Candle (EntryCandle=true) uses its own CandleTrendTimeframe for the main indicators with the same TrendFilterMode; HTF components keep HigherTimeframe. |
9. 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. Any increase or decrease in actual DCA count relocks the threshold using the newly selected base step. Ticks/bars or volume-only partial closes with unchanged DCA count do not relock it. |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. Every Candle plan is rechecked at the final request quote: valid broker-normalized SL/TP, nearest opposing S/R when UseCandleTPBarrier=true; R:R is informational and does not block Candle below 2R. SL=0 or TP=0 retains basket mode with RR=N/A. SAT Auto retains TP3=3R; a barrier blocks it only in Candle context when UseCandleTPBarrier=true. CS spacing considers only same-side CS; BF spacing considers only same-side BF. By default one open request is submitted per tick, except for an eligible OR regular Entry + Candle pair. PreventSpecialEntryDcaSameTick=false additionally permits one eligible DCA after a settled BF/CS fill, never a third request after the OR pair; STEP_CLOSE still requires a new bar.
| Input | Default | Meaning | Example / notes |
|---|---|---|---|
| UseDCA | true | Enable additional DCA orders. | Requires a hedging account. With DCA enabled, initialization fails on netting or exchange accounts because merged positions cannot represent separate DCA steps. false disables DCA additions; other enabled Entry sources may still open orders. |
| UseDcaTrendFilter | true | Enable DCA trend gates independently of Entry. | true applies TrendFilterMode after DcaTrendFilterOrderCount is reached. false bypasses main/Bias trend gates for DCA. A zero DcaTrendFilterOrderCount still disables DCA trend. Price, spread, hours, position caps and protection remain active. |
| DcaTrendFilterOrderCount | 1 | Progression-count threshold for the DCA trend filter; 0 disables the filter. | Compare against max(1, existing progression count). N=1 filters the first DCA after a CS/BF-only basket; N=5 requires 5 existing regular Entry/DCA positions. CS/BF/LB do not advance progression. UseDcaTrendFilter must also be enabled. |
| DcaType | MATS_DCA_STEP_CLOSE | STEP_TF=0, STEP_CLOSE=1; ATR=2 uses the latched ATR distance. | All modes follow entry sources. STEP_CLOSE requires the first tick of a new EntryTimeframe bar. STEP_TF/ATR can also check other ticks, at most one DCA per side per bar. By default no DCA follows an entry submission. PreventSpecialEntryDcaSameTick=false permits one eligible DCA after a settled BF/CS fill, waiving only its companion delay. |
| LotMode | MATS_LOT_MULTIPLY | Multiply lots (MULTIPLY=0) or add lots (ADD=1). | Multiply compounds the active base (LotTimeNewLots in the window, InitialLots outside), or continues from the retained filled-lot baseline after pruning. ADD uses the active base + LotAddFactor for the first add after regular Entry, then the latest actual DCA lot. LotMode=2 is unsupported. Candle/Bias/Balance do not advance these steps. |
| InitialMultiplier | 1.15 | Lot multiplier. | InitialLots × multiplier^count. |
| LotAddFactor | 0.01 | Lot increment in ADD mode. | The first DCA after regular Entry uses the active base + LotAddFactor: LotTimeNewLots inside an enabled window, InitialLots outside. An inherited opposite-side Entry lot does not change this base. Later adds use the latest actual DCA lot or retained pre-prune baseline + LotAddFactor. |
| SingleOrderTPPips | 0 | Individual TP for each DCA order; 0 disables it. | Chain TP remains active. SL/TP is rounded outward to the broker price tick after minimum stop-distance checks. |
| ChainTPPips | 150 | Close the chain by distance from break-even (BE). | BE includes DCA/Candle/LB in the same chain. |
| ChainTPMoney | 0 | Close the chain by total monetary profit. | Candle profit is included. |
| DcaStepPips | 100 | Original base pip step; section9.2 can replace it according to currently open actual DCA adds. | Select tiers using only actual DCA count and strict count > threshold. STEP: PipToPrice(effective step * max(1,dcaCount)). ATR: max(PipToPrice(effective step), ATR * multiplier) * max(1,dcaCount). The existing multiplier dcaCount still means regular Entry + DCA. Example: 6 DCA + 1 Entry selects150 pips and a STEP gap of1050 pips. When DCA count falls, select again; no active tier uses the original input. |
| DcaATRPeriod | 14 | Separate DCA ATR period for DcaType=ATR; minimum 1. | Always uses EntryTimeframe, closed candle shift=1, and a separate handle from filters. |
| DcaATRMultiplier | 1.5 | Finite positive ATR multiplier; used only in ATR mode. | Use max(PipToPrice(effective base step selected by9.2), ATR[1] * multiplier) * max(1,dcaCount). Relock after fills or any increase/decrease in live actual DCA count. Missing data blocks and retries. Ticks/bars and volume-only partial closes with unchanged DCA count retain the lock. An active tier fully replaces the original base step. |
| UseCurrentDcaLotForEntry | false | Start 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. |
| EmaTrendScore | 2 | EMA Filter weight in SCORE mode. | BUY adds and SELL subtracts; 0 keeps EMA visible without contributing points. |
| MacdTrendScore | 1 | MACD Filter weight in SCORE mode. | Counted only when UseMacdFilter=true and the filter returns BUY or SELL. |
| MarketStructureTrendScore | 2 | Market 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. |
| AdxTrendScore | 1 | ADX + DI weight in SCORE mode. | ADX must be strong enough; +DI/-DI determines the sign. |
| HtfAlignmentTrendScore | 2 | HTF Alignment weight in SCORE mode. | HTF EMA direction determines whether this weight is added or subtracted. |
| VwapTrendScore | 2 | VWAP weight in SCORE mode. | Price must be on the correct side of VWAP and slope must match the direction. |
| VolumeProfileTrendScore | 2 | Volume Profile Bias weight in SCORE mode. | Rising POC gives BUY; falling POC gives SELL, with price also on the correct side of POC. |
| TrendFilterMinScore | 3 | Minimum 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. |
9.1. DCA - TP after drawdown
Adjust the TP of each BUY/SELL chain after a loss threshold.
Processing logic: Compare each side's floating profit + swap with either enabled loss threshold (OR). Percentage uses current account balance; ignore this percentage gate if balance is invalid or nonpositive. Opposite-side profit does not offset the loss. A new activation requires at least one actual DCA add. Persist activation across recovery, added orders, pruning, partial closes and restart using surviving position identifiers, scoped by account/server, symbol, magic and side. An empty chain or a new chain without surviving members uses normal TP. Disabling the feature ignores saved activation. BUY closes at Bid >= BE + PipToPrice(TP); SELL at Ask <= BE - PipToPrice(TP). Recalculate volume-weighted BE from remaining Entry/DCA/Candle/Bias and in-chain LB positions; exclude independent LB. The adjusted target replaces ChainTPPips only for the activated side. ChainTPMoney may close earlier; all-position, daily and weekend exits keep priority. Trailing retains control when TrailOverridesChainTP allows it. Individual broker SL/TP may close positions earlier. Price-based BE does not cover fees, swap or slippage.
| Input | Default | Meaning | Example / notes |
|---|---|---|---|
| UseLossChainTP | true | Enable adjusted TP after a chain loss threshold. | On by default (true). Each BUY/SELL chain activates independently after an actual DCA add and either enabled loss threshold. |
| LossChainTriggerPct | -20.0 | Chain floating profit + swap as a percentage of current balance; 0 disables this gate. | Finite and <= 0. Balance 50,000 and -20% give a -10,000 percentage threshold; the default -5,000 money threshold activates first. Invalid/nonpositive balance disables the percentage gate. |
| LossChainTriggerMoney | -5000.0 | Negative floating profit + swap threshold in account currency; 0 disables this gate. | Default -5000.0: activate at a chain loss of 5,000 account-currency units, even before -20% is reached. Finite and <= 0. Both gates at 0 prevent new activation; existing activation remains while the feature is enabled. |
| LossChainTPPips | 100 | Adjusted TP in the same PipSize/PipToPrice units as DcaStepPips. | Default 100 pips; finite and > 0. If PipSize() = 0.01, 100 pips is a price distance of 1.00; no separate multiplier. Candle TP pruning uses this effective side target too. |
9.2. DCA - Distance by order count
Select the base step from each side’s currently open actual DCA adds.
Processing logic: Use only currently open actual DCA adds per BUY/SELL side (dcaAddCount), including confirmed reset DCA, to select the effective base step. Exclude initial Entry, CS/BF/Balance and retained lot progression. Select the highest threshold for which live DCA count > DcaDistanceCount; equality does not activate that tier. Defaults: 0–5 DCA use original DcaStepPips; 6–10 use 150 pips; 11–15 use 200; 16–20 use 250; 21 or more use 350. The selected value replaces DcaStepPips in the existing distance formula without modifying the input. It is a base step, not the entire gap. STEP distance = PipToPrice(effective step * max(1,dcaCount)), where this multiplier dcaCount still includes regular Entry + DCA and excludes CS/BF/Balance. Example: 6 DCA + 1 Entry selects 150 pips and factor7, so the gap is 1050 pips (10.50 price when PipSize()=0.01). Without a regular Entry, the multiplier follows the current DCA count. ATR distance = max(PipToPrice(effective step), ATR[1] * DcaATRMultiplier) * max(1,dcaCount); the original base is no longer a floor after a tier replaces it. Select again when DCA count rises or falls: from 11 down to 10 DCA restores150, and down to5 restores the original input. ATR relocks after fills, increased partial fills, or any change in actual DCA count, including closures. Missing ATR invalidates the previous lock and blocks adds until data recovers. Ticks/bars or volume-only partial closes with unchanged DCA count retain the lock. Restart uses surviving actual DCA adds. Threshold0 disables a tier. Enabled thresholds must strictly increase; their pip steps must be finite, positive and nondecreasing. Disable all four thresholds to always use the original DcaStepPips.
| Input | Default | Meaning | Example / notes |
|---|---|---|---|
| DcaDistanceCount1 | 5 | Inputs label: 1. Current DCA adds per side (0 = disable tier). Live DCA-add count threshold; activate only when actual DCA count exceeds it. 0 disables tier. | Exclude Entry/CS/BF/Balance. At exactly 5 DCA the tier is inactive; it activates from 6. Reevaluate when actual DCA count decreases. |
| DcaDistancePips1 | 150.0 | Inputs label: 1. DCA step (pips). Base pip step replacing DcaStepPips when this tier is selected. | Keep the existing multiplier max(1, regular Entry + DCA) in STEP. ATR uses max(converted effective step, ATR * multiplier) before the same count factor. The original input stays available whenever no enabled threshold is exceeded. |
| DcaDistanceCount2 | 10 | Inputs label: 2. Current DCA adds per side (0 = disable tier). Live DCA-add count threshold; activate only when actual DCA count exceeds it. 0 disables tier. | Exclude Entry/CS/BF/Balance. At exactly 10 DCA the tier is inactive; it activates from 11. Reevaluate when actual DCA count decreases. |
| DcaDistancePips2 | 200.0 | Inputs label: 2. DCA step (pips). Base pip step replacing DcaStepPips when this tier is selected. | Keep the existing multiplier max(1, regular Entry + DCA) in STEP. ATR uses max(converted effective step, ATR * multiplier) before the same count factor. The original input stays available whenever no enabled threshold is exceeded. |
| DcaDistanceCount3 | 15 | Inputs label: 3. Current DCA adds per side (0 = disable tier). Live DCA-add count threshold; activate only when actual DCA count exceeds it. 0 disables tier. | Exclude Entry/CS/BF/Balance. At exactly 15 DCA the tier is inactive; it activates from 16. Reevaluate when actual DCA count decreases. |
| DcaDistancePips3 | 250.0 | Inputs label: 3. DCA step (pips). Base pip step replacing DcaStepPips when this tier is selected. | Keep the existing multiplier max(1, regular Entry + DCA) in STEP. ATR uses max(converted effective step, ATR * multiplier) before the same count factor. The original input stays available whenever no enabled threshold is exceeded. |
| DcaDistanceCount4 | 20 | Inputs label: 4. Current DCA adds per side (0 = disable tier). Live DCA-add count threshold; activate only when actual DCA count exceeds it. 0 disables tier. | Exclude Entry/CS/BF/Balance. At exactly 20 DCA the tier is inactive; it activates from 21. Reevaluate when actual DCA count decreases. |
| DcaDistancePips4 | 350.0 | Inputs label: 4. DCA step (pips). Base pip step replacing DcaStepPips when this tier is selected. | Keep the existing multiplier max(1, regular Entry + DCA) in STEP. ATR uses max(converted effective step, ATR * multiplier) before the same count factor. The original input stays available whenever no enabled threshold is exceeded. |
10. 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.
| Input | Default | Meaning | Example / notes |
|---|---|---|---|
| UseNewMultiplier | false | Enable the multiplier table. | false uses InitialMultiplier. true applies the highest reached configured tier; reaching the lot cap does not restart progression. |
| NewMultCount1 | 5 | dcaCount threshold for tier 1. | Set thresholds in increasing order. |
| NewMult1 | 1.5 | Multiplier at tier 1. | Can be reduced for deeper chains. |
| NewMultCount2 | 8 | dcaCount threshold for tier 2. | Set thresholds in increasing order. |
| NewMult2 | 1.3 | Multiplier at tier 2. | Can be reduced for deeper chains. |
| NewMultCount3 | 13 | dcaCount threshold for tier 3. | Set thresholds in increasing order. |
| NewMult3 | 1.2 | Multiplier at tier 3. | Can be reduced for deeper chains. |
| NewMultCount4 | 21 | dcaCount threshold for tier 4. | Set thresholds in increasing order. |
| NewMult4 | 1.15 | Multiplier at tier 4. | Can be reduced for deeper chains. |
| NewMultCount5 | 30 | dcaCount threshold for tier 5. | Set thresholds in increasing order. |
| NewMult5 | 1.1 | Multiplier at tier 5. | Can be reduced for deeper chains. |
12. Same-side DCA pruning (Sniper)
Reduce BUY and SELL independently using whole-position closes.
Processing logic: Count regular Entry + DCA positions per side, excluding Candle/Bias/Balance. Select losing DCA positions farthest from price and just enough newest profitable Entry/DCA positions on the same side. Try fewer losers if necessary. Target net profit is SniperProfitPct% of the selected loss. No estimated exit fees or spread are reserved; incurred entry fees and confirmed closing proceeds are still included. Close winners first and verify actual proceeds before each loser; exit fees and slippage can reduce actual net profit below the target. No daily or opposite-side profit is used. The repeat threshold activates only after a confirmed losing DCA close, survives restart and resets when that side has no positions. Keep configured chain TP; preserve the pre-prune lot progression, advancing only on confirmed new DCA fills, subject to the active lot cap. Sniper and Candle TP Prune cannot act on the same side in the same candle; new DCA waits for the next EntryTimeframe candle.
| Input | Default | Meaning | Example / notes |
|---|---|---|---|
| UseSniper | true | Enable independent same-side DCA pruning. | Uses the EA symbol/Magic scope; MagicNumber=0 adopts all positions on the symbol. |
| SniperTriggerTotal | 15 | Per-side Entry + DCA threshold before the first successful prune. | BUY and SELL are counted separately; Candle/Bias/Balance are excluded. |
| SniperRepeatTrigger | 10 | Per-side threshold after the first successful prune. | Must be between 2 and SniperTriggerTotal. Resets when that side becomes empty. |
| SniperFirstCount | 2 | Maximum losing DCA positions per action, farthest first. | May prune fewer; partial-volume pruning is removed. |
| SniperLastCount | 0 | Maximum profitable same-side Entry/DCA positions used. | 0 removes the count cap; selection always stops when sufficiently funded. |
| SniperProfitPct | 10.0 | Minimum desired net profit after pruning, as a percentage of the selected loss; not a percentage of account capital or total lots. | Required remaining profit = pruned loss × SniperProfitPct / 100. For a 100 USD loss: 0% requires 100 USD of winner profit to break even; 5% requires 105 USD; 10% requires 110 USD; 20% requires 120 USD. Examples include allocated entry fees; no estimated exit-fee/spread reserve is added. Winners close first; actual proceeds are confirmed and checked before each loser. Closing fees and slippage may reduce the final result below target. Must be finite and ≥ 0; monetary values use account currency. Lower percentages make funding the prune easier. |
13. 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.
| Input | Default | Meaning | Example / notes |
|---|---|---|---|
| UseLotBalance | false | Enable lot balancing. | A hedging account is recommended. |
| LotBalanceMode | MATS_LB_ADD_TO_CHAIN | Add to the same chain or use INDEPENDENT mode. | Independent mode uses a magic offset. |
| LB_LossPctTrigger | 30 | Loss threshold as a percentage of balance required for balancing. | Must be finite and nonnegative; imbalance, losing-lot share, losing count, spread and cooldown gates must also pass. |
| LB_LotDiffStart | 1.0 | Finite positive lot imbalance that activates balancing. | Requires 0 <= LB_LotDiffStop < LB_LotDiffStart. Once active, balancing continues toward the stop threshold while the loss gates remain satisfied. |
| LB_LotDiffStop | 0.2 | Lot imbalance small enough to stop balancing. | Must be finite, nonnegative and below LB_LotDiffStart. A residual below the broker step or minimum does not trigger another order. |
| LB_AddLot | 0.2 | Maximum volume added per balancing step. | Actual volume is capped by the remaining BUY/SELL lot imbalance, MaxLots and the broker volume step. Round down; skip volumes below the minimum. Never add past the imbalance and swap the heavy/light side. |
| LB_DelaySeconds | 10 | Nonnegative delay after the latest Balance fill. | Includes immediate fills, partial fills and later confirmation of pending execution; retained after closing and restart. Unresolved opens block further submission while position protection remains active. |
| LB_NegLotsPct | 70 | Minimum percentage of managed chain lots currently losing. | Must be finite in 0..100; this is a volume share, not the percentage of positions. |
| LB_LossOrdersCount | 1 | Minimum number of losing positions required for balancing. | Must be at least 1; does not replace the total-loss or losing-lot-share gates. |
| LB_MagicOffset | 99999 | Magic offset for Independent mode. | Avoid overlap with other EAs. |
14. 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.
| Input | Default | Meaning | Example / notes |
|---|---|---|---|
| UseChainTrailing | false | Enable 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. |
| TrailStartPips | 150 | Profit distance from BE required to arm trailing. | BUY example from the source guide: Bid ≥ BE + 15p; use the EA's pip convention for TrailStartPips. |
| TrailStepPips | 50 | Stop-tightening step. | Moves only in the favorable direction. |
| TrailFirstSLBufferPips | 20 | Initial locked profit distance. | Set below TrailStartPips. |
| TrailOverridesChainTP | true | Bypass 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. |
| UseBrokerTrailSL | false | Mirror the virtual stop to broker SL. | Provides protection during disconnection. |
15. 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.
| Input | Default | Meaning | Example / notes |
|---|---|---|---|
| MoneyTPAll | 0 | Total profit threshold to close all managed positions; 0 disables. | In account currency. |
| MoneySLAll | 0 | Total loss threshold to close all managed positions; 0 disables. | Must be negative when enabled. |
16. 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.
| Input | Default | Meaning | Example / notes |
|---|---|---|---|
| UseWeekendClose | false | Close 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. |
| WeekendCloseTime | 20:45:00 | Closing time in server time. | Set sufficiently before market close. The alert window starts 10 minutes before WeekendCloseTime. |
17. Daily profit target
Daily profit/loss limits in money or as a percentage of account balance when the trading day is initialized.
Processing logic: DailyTargetType selects BUY, SELL or BUY+SELL (default). Daily P/L includes realized profit and swap, opening/closing commissions and fees charged during the day, plus current floating profit and swap for the selected direction(s). It uses the current symbol and MagicNumber footprint, including independent lot-balance positions. Opposite-side P/L does not offset a single-side target. SELL closing deals belong to BUY P/L and vice versa. Reversal fees are split by closed/opened volume; profit and swap belong to the direction being closed. Incomplete history postpones the daily check. Reaching an enabled money or percentage profit/loss threshold closes all managed positions in the selected direction(s) and blocks new Entry/Candle/Bias/DCA/Balance orders in that scope until the new trading day plus NewDayDelayMinutes. The opposite direction remains eligible under other trading gates. BUY+SELL retains combined behavior. Percentage limits use the entire saved starting daily account balance, without dividing it by direction. First attachment uses initialization balance; intraday restarts reuse the saved base, reset on the next server trading day plus delay. A nonpositive base disables only percentage limits. The first enabled money or percentage threshold reached triggers. Restarting or changing DailyTargetType after a hit retains its original scope until reset. Unfinished liquidation retains its original direction across rollover and retries; a new input choice cannot redirect it. Money TP/SL All and Weekend Close retain their behavior for both directions.
| Input | Default | Meaning | Example / notes |
|---|---|---|---|
| DailyTargetType | MATS_DAILY_BUY_SELL | Direction for all daily profit/loss checks, closing and entry locks: BUY / SELL / BUY+SELL. | Default BUY+SELL preserves combined behavior. BUY example: realized BUY +80, floating BUY +20, SELL -200 → daily BUY P/L +100; a target of 100 closes/locks BUY only. SELL remains subject to other gates. The hit scope survives restart and input changes. |
| DailyProfitTarget | 0 | Daily monetary profit target. Applies only to DailyTargetType; percentage thresholds use the entire starting daily balance. | 0 disables. If percentage limits are also enabled, the first money or percentage threshold reached triggers. |
| DailyLossLimit | 0 | Daily monetary loss limit. Applies only to DailyTargetType; percentage thresholds use the entire starting daily balance. | Must be negative or 0. If percentage limits are also enabled, the first money or percentage threshold reached triggers. |
| DailyProfitTargetPct | 0 | Daily TP as a percentage of starting daily balance; positive value, 0 disables. Applies only to DailyTargetType; percentage thresholds use the entire starting daily balance. | With a 1,000 USD base, 5 means +50 USD. If DailyProfitTarget=30, the EA stops already at +30 USD. |
| DailyLossLimitPct | 0 | Daily SL as a percentage of starting daily balance; positive value, 0 disables. Applies only to DailyTargetType; percentage thresholds use the entire starting daily balance. | 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. |
| NewDayDelayMinutes | 120 | Delay before releasing the daily latch on a new day. | Helps avoid rollover. |
18. 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.
| Input | Default | Meaning | Example / notes |
|---|---|---|---|
| StochKPeriod | 8 | Stochastic K period. | Fast configuration. |
| StochDPeriod | 3 | Stochastic D period. | Fast configuration. |
| StochSlowing | 3 | Stochastic slowing period. | Fast configuration. |
| StochMaMethod | MODE_SMA | Stochastic moving-average method. | MQL5 enum. |
| StochPrice | STO_LOWHIGH | Stochastic price field. | MQL5 enum. |
| StochOverbought | 80 | Stochastic overbought threshold. | Currently not used by Signal_Stoch; Entry direction is compared with 50. |
| StochOversold | 20 | Stochastic oversold threshold. | Currently not used by Signal_Stoch; Entry direction is compared with 50. |
19. 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.
| Input | Default | Meaning | Example / notes |
|---|---|---|---|
| StochReverseKPeriod | 8 | Separate K period, minimum 1. | Does not change the existing StochKPeriod. |
| StochReverseDPeriod | 3 | D period passed to iStochastic, minimum 1. | D does not participate in BUY/SELL conditions. |
| StochReverseSlowing | 3 | K slowing, minimum 1. | Affects the MAIN/K line. |
| StochReverseMaMethod | MODE_SMA | Stochastic Reverse MA method. | ENUM_MA_METHOD enum. |
| StochReversePrice | STO_LOWHIGH | Price field for Stochastic Reverse. | ENUM_STO_PRICE enum. |
| StochReverseOversold | 20 | Oversold threshold; 0 <= Oversold < Overbought <= 100. | 19 → 20 gives BUY; 20 → 21 does not. |
| StochReverseOverbought | 80 | Separate overbought threshold. | 81 → 80 gives SELL; 80 → 79 does not. |
20. 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.
| Input | Default | Meaning | Example / notes |
|---|---|---|---|
| BollingerPeriod | 20 | Bollinger period, minimum 1. | Shift is fixed at 0; there is no shift input. |
| BollingerDeviation | 2.0 | Standard-deviation multiplier; must be finite and >0. | Default is 2.0. |
| BollingerPrice | PRICE_CLOSE | Applied price for calculating BB bands. | Comparison always uses Close[1], even with PRICE_TYPICAL selected for band calculation. |
21. 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.
| Input | Default | Meaning | Example / notes |
|---|---|---|---|
| RsiPeriod | 14 | RSI period. | Uses closed candles. |
| RsiPrice | PRICE_CLOSE | RSI applied price. | Uses closed candles. |
| RsiOverbought | 70 | RSI overbought threshold. | Currently not used by Signal_RSI; Entry direction is compared with 50. |
| RsiOversold | 30 | RSI oversold threshold. | Currently not used by Signal_RSI; Entry direction is compared with 50. |
22. CCI Entry
Independently enabled entry source.
Processing logic: Reads the latest closed EntryTimeframe bar. CCI >0 gives BUY, <0 gives SELL; zero is neutral. Successful reads are cached; missing or invalid data waits and retries.
| Input | Default | Meaning | Example / notes |
|---|---|---|---|
| CciPeriod | 14 | CCI period, must be at least 1. | 14 EntryTimeframe candles by default. |
| CciPrice | PRICE_CLOSE | CCI applied price. | PRICE_CLOSE uses the closed candle close; PRICE_TYPICAL uses (High + Low + Close) / 3. |
23. 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.
| Input | Default | Meaning | Example / notes |
|---|---|---|---|
| SupertrendAtrPeriod | 12 | Supertrend ATR period. | A larger value smooths the calculation. |
| SupertrendMultiplier | 3.5 | Band width multiplier. | A larger value reduces direction flips. |
24. 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 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 without a submission, DCA may still qualify under its own price-step rules. CHoCH is checked before DCA; when no entry has been submitted, new-bar DCA may still qualify without consuming the CHoCH event. At most one open request is submitted per tick. 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.
| Input | Default | Meaning | Example / notes |
|---|---|---|---|
| ChochSwingLookback | 5 | Closed 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. |
| ChochHistoryBars | 500 | Closed candles used to build structure, independent of displayed candle count. | From 2 × lookback + 4 to 5000. Keep enough history to identify structure. |
| ShowChochSwings | true | Show swing markers and structure labels. | Disabling only hides drawings; it does not disable selected CHoCH Entry. |
| ShowChochBOS | true | Show continuation BOS segments. | Horizontal segments end at the breakout candle; no infinite rays. |
| ShowChochSignals | true | Show CHoCH lines and BUY/SELL signal arrows. | BUY below the confirmation candle, SELL above. An arrow does not mean an order exists. |
| ShowChochEntries | true | Show Entry BUY/SELL from executed CHoCH deals. | Blocked or rejected orders have no Entry label. Partial fills show each deal. |
| ChochSwingHighColor | clrOrange | Swing High marker and label color. | Default Orange. |
| ChochSwingLowColor | clrDodgerBlue | Swing Low marker and label color. | Default DodgerBlue. |
| ChochBullishColor | clrBlue | BUY structure, signal, and entry color. | Default Blue. |
| ChochBearishColor | clrRed | SELL structure, signal, and entry color. | Default Red. |
25.1. Candle - Signal and confidence
Closed-candle patterns combined with trend, support/resistance, confirmation, ATR, and scoring.
Processing logic: Candle flow: closed pattern → confirmation → nearby support/resistance → Candle trend → confidence → actual SL/TP → SL/TP validation and the optional UseCandleTPBarrier check → submission. New-chain Candle uses FirstTPPips; added CS uses the pattern target. A positive FirstSLPips selects fixed SL; otherwise enabled Auto SL uses structure on TrendTimeframe, or SL stays zero. There is no minimum 2R gate; R:R is informational. Same-side CS spacing uses ATR; CS shares chain BE/profit but does not advance DCA counts/lots. Each signal timestamp trades once, including after restart. UseEntryTrendFilter controls the gate; confidence may still use Candle direction with the gate off. UI BUY/SELL colors follow CandleTrendTimeframe; the label timeframe remains CandleTimeframe. EntryCandle includes Candle in the shared AND/OR combination as in v1.98. OR requires at least one nonzero signal and no opposing direction; AND requires every selected source to be nonzero and aligned. Priority is pending CHoCH, otherwise BF, combined first Entry, then Candle joining a chain. No independent Candle companion follows an ordinary Entry in the same engine pass. Candle shares the managed-fill clock for OpenOnNewCandle/OpenDelaySeconds. A pattern rejected by spread or trading hours is discarded until a new Candle bar; technical data failures remain retryable. Confidence uses EMA, MACD and structure on TrendTimeframe as in v1.98; opposing nonzero directions make the context neutral and remove the 20 trend points. CandleTrendTimeframe still controls the Candle permission filter, not those confidence points. A BF/Candle chain-add may have a DCA companion only when PreventSpecialEntryDcaSameTick permits and the prior request has settled.
| Input | Default | Meaning | Example / notes |
|---|---|---|---|
| UseCandleSignal | true | Enable analysis and drawing; this does not authorize Candle orders. | EntryCandle alone controls Candle trading. Notifications/display may keep analysis enabled when EntryCandle=false. |
| MinConfidenceScore | 70 | Minimum signal score. | 35 pattern + 25 support/resistance + 20 trend + 15 confirmation + 5 volume. |
25.2. Candle - Lot sizing
Closed-candle patterns combined with trend, support/resistance, confirmation, ATR, and scoring.
Processing logic: Candle flow: closed pattern → confirmation → nearby support/resistance → Candle trend → confidence → actual SL/TP → SL/TP validation and the optional UseCandleTPBarrier check → submission. New-chain Candle uses FirstTPPips; added CS uses the pattern target. A positive FirstSLPips selects fixed SL; otherwise enabled Auto SL uses structure on TrendTimeframe, or SL stays zero. There is no minimum 2R gate; R:R is informational. Same-side CS spacing uses ATR; CS shares chain BE/profit but does not advance DCA counts/lots. Each signal timestamp trades once, including after restart. UseEntryTrendFilter controls the gate; confidence may still use Candle direction with the gate off. UI BUY/SELL colors follow CandleTrendTimeframe; the label timeframe remains CandleTimeframe. EntryCandle includes Candle in the shared AND/OR combination as in v1.98. OR requires at least one nonzero signal and no opposing direction; AND requires every selected source to be nonzero and aligned. Priority is pending CHoCH, otherwise BF, combined first Entry, then Candle joining a chain. No independent Candle companion follows an ordinary Entry in the same engine pass. Candle shares the managed-fill clock for OpenOnNewCandle/OpenDelaySeconds. A pattern rejected by spread or trading hours is discarded until a new Candle bar; technical data failures remain retryable. Confidence uses EMA, MACD and structure on TrendTimeframe as in v1.98; opposing nonzero directions make the context neutral and remove the 20 trend points. CandleTrendTimeframe still controls the Candle permission filter, not those confidence points. A BF/Candle chain-add may have a DCA companion only when PreventSpecialEntryDcaSameTick permits and the prior request has settled.
| Input | Default | Meaning | Example / notes |
|---|---|---|---|
| CandleSignalLot | 0.0 | Candle lot size; 0 uses InitialLots. | Capped by MaxLots; the first Candle order uses First TP/SL. |
| CandleMinDistanceATR | 1.5 | Minimum spacing to the nearest open same-side CS: closed CandleTimeframe ATR(14) × multiplier. | Only same-side CS positions count; Entry, DCA, BF and Balance are ignored. ATR=2 and multiplier 1.5 require 3 price units to every same-side CS. The first CS has no spacing constraint; other data and entry gates still apply. 0 disables spacing. Rechecked at the final Ask/Bid before submission. |
| UseCandleConfidenceLot | true | Increase Candle lots by confidence tiers. | Confidence: 35 pattern +25 near S/R +20 legacy trend +15 confirmation +5 volume, capped at 100. Opposing EMA/MACD/structure directions remove the 20 trend points. Base 0.05, minimum 70, score step 10 and lot step 0.05 give 0.10 lots at score 80 and 0.20 at score 100. |
| CandleConfidenceStep | 10 | Confidence points per additional lot tier; 1..100 when enabled. | With minimum 70 and step 10: scores 70–79 use tier 0, 80–89 tier 1, 90–99 tier 2, and 100 tier 3. Scores below the minimum cannot enter. Recalculate for each signal; tiers do not accumulate across trades. |
| CandleLotStep | 0.05 | Extra lots per confidence tier; finite and greater than zero when enabled. | For example, base lot 0.10, threshold 70, confidence step 10 and CandleLotStep=0.05 give 0.10/0.15/0.20/0.25 lots at scores 70/80/90/100 before normalization. The time profile still selects the base; effective caps and broker volume step/minimum apply after the tier addition. Confidence is not a win probability. |
25.3. Candle - SL/TP checks
Closed-candle patterns combined with trend, support/resistance, confirmation, ATR, and scoring.
Processing logic: Candle flow: closed pattern → confirmation → nearby support/resistance → Candle trend → confidence → actual SL/TP → SL/TP validation and the optional UseCandleTPBarrier check → submission. New-chain Candle uses FirstTPPips; added CS uses the pattern target. A positive FirstSLPips selects fixed SL; otherwise enabled Auto SL uses structure on TrendTimeframe, or SL stays zero. There is no minimum 2R gate; R:R is informational. Same-side CS spacing uses ATR; CS shares chain BE/profit but does not advance DCA counts/lots. Each signal timestamp trades once, including after restart. UseEntryTrendFilter controls the gate; confidence may still use Candle direction with the gate off. UI BUY/SELL colors follow CandleTrendTimeframe; the label timeframe remains CandleTimeframe. EntryCandle includes Candle in the shared AND/OR combination as in v1.98. OR requires at least one nonzero signal and no opposing direction; AND requires every selected source to be nonzero and aligned. Priority is pending CHoCH, otherwise BF, combined first Entry, then Candle joining a chain. No independent Candle companion follows an ordinary Entry in the same engine pass. Candle shares the managed-fill clock for OpenOnNewCandle/OpenDelaySeconds. A pattern rejected by spread or trading hours is discarded until a new Candle bar; technical data failures remain retryable. Confidence uses EMA, MACD and structure on TrendTimeframe as in v1.98; opposing nonzero directions make the context neutral and remove the 20 trend points. CandleTrendTimeframe still controls the Candle permission filter, not those confidence points. A BF/Candle chain-add may have a DCA companion only when PreventSpecialEntryDcaSameTick permits and the prior request has settled.
| Input | Default | Meaning | Example / notes |
|---|---|---|---|
| UseAutoCandleStopLoss | false | Use structural SL for CS when FirstSLPips=0 and SAT Auto does not override it. | Compute at the submission quote after pattern, confirmation, S/R proximity, trend and confidence pass. Use closed TrendTimeframe bars; require correct-side SL and a distance of 0.2–5 ATR after broker normalization. Missing data or a crossed stop blocks entry while the signal remains available within its Candle bar. Fixed SL bypasses this stage. With Auto off and FirstSLPips=0, skip analytical SL and R:R filters. |
| CandleStopLossATRBuffer | 0.25 | ATR(14) buffer beyond structure when Auto Candle SL is actually selected. | Place BUY SL below the structural boundary and SELL SL above it. Does not filter patterns when fixed SL is selected, Auto SL is off, or SAT Auto overrides it. |
| CandleStopLossSwingLookback | 12 | TrendTimeframe bars searched for a confirmed swing when structural SL is selected. | Read only when Auto Candle SL is actually used. Combine the signal cluster boundary (up to 3 candles) with the nearest confirmed swing. Minimum 3. |
| UseCandleTPBarrier | true | Enable the opposing S/R barrier check before Candle TP. | ON/true (default): before submitting a new-chain or additional Candle order, find the nearest opposing CandleTimeframe S/R and cap TP at least one tick before it. Reject when there is no tradable room or broker stop distance would push TP through the barrier. OFF/false: skip the entire final TP barrier lookup/check, keep the requested TP without S/R capping, and do not wait for S/R data for this step. First orders still use FirstTPPips and added CS orders use the pattern TP, followed by broker normalization. Quote/stop geometry, enabled structural Auto SL/ATR checks and SAT TP3=3R remain active; there is no 2R entry threshold. Pattern proximity to S/R remains unchanged. |
25.4. Candle - TP profit pruning
Closed-candle patterns combined with trend, support/resistance, confirmation, ATR, and scoring.
Processing logic: Candle flow: closed pattern → confirmation → nearby support/resistance → Candle trend → confidence → actual SL/TP → SL/TP validation and the optional UseCandleTPBarrier check → submission. New-chain Candle uses FirstTPPips; added CS uses the pattern target. A positive FirstSLPips selects fixed SL; otherwise enabled Auto SL uses structure on TrendTimeframe, or SL stays zero. There is no minimum 2R gate; R:R is informational. Same-side CS spacing uses ATR; CS shares chain BE/profit but does not advance DCA counts/lots. Each signal timestamp trades once, including after restart. UseEntryTrendFilter controls the gate; confidence may still use Candle direction with the gate off. UI BUY/SELL colors follow CandleTrendTimeframe; the label timeframe remains CandleTimeframe. EntryCandle includes Candle in the shared AND/OR combination as in v1.98. OR requires at least one nonzero signal and no opposing direction; AND requires every selected source to be nonzero and aligned. Priority is pending CHoCH, otherwise BF, combined first Entry, then Candle joining a chain. No independent Candle companion follows an ordinary Entry in the same engine pass. Candle shares the managed-fill clock for OpenOnNewCandle/OpenDelaySeconds. A pattern rejected by spread or trading hours is discarded until a new Candle bar; technical data failures remain retryable. Confidence uses EMA, MACD and structure on TrendTimeframe as in v1.98; opposing nonzero directions make the context neutral and remove the 20 trend points. CandleTrendTimeframe still controls the Candle permission filter, not those confidence points. A BF/Candle chain-add may have a DCA companion only when PreventSpecialEntryDcaSameTick permits and the prior request has settled.
| Input | Default | Meaning | Example / notes |
|---|---|---|---|
| UseCandleTPPrune | true | YES/true: use a fully TP-closed Candle profit to close whole losing DCA orders on the same side, farthest entry first. Skip unaffordable orders. NO/false preserves existing behavior. | The closing group must reach ChainTPMoney OR ChainTPPips converted using total Candle plus selected DCA lots. Both disabled: no pruning. Example: Candle +100, DCA -50 and -25, money target 20 leaves 25 before execution reserves. Use confirmed net profit including fees; recheck each close and reserve entry-rate exit fees plus one spread. Execution prices are not guaranteed. Only |DCA| orders opened before the Candle close qualify, not BF/CS/Entry/LB. Only live TP events are processed; old TP events are not replayed after restart. Candles previously partially closed for another reason are excluded. Each budget is spent at most once; reserved proceeds cannot also fund Sniper via daily profit. Remaining chain TP and Candle SL are unchanged. When this side has activated UseLossChainTP, the pruning group uses LossChainTPPips as its pip target; ChainTPMoney remains independent. |
25.5. Candle - Notifications
Closed-candle patterns combined with trend, support/resistance, confirmation, ATR, and scoring.
Processing logic: Candle flow: closed pattern → confirmation → nearby support/resistance → Candle trend → confidence → actual SL/TP → SL/TP validation and the optional UseCandleTPBarrier check → submission. New-chain Candle uses FirstTPPips; added CS uses the pattern target. A positive FirstSLPips selects fixed SL; otherwise enabled Auto SL uses structure on TrendTimeframe, or SL stays zero. There is no minimum 2R gate; R:R is informational. Same-side CS spacing uses ATR; CS shares chain BE/profit but does not advance DCA counts/lots. Each signal timestamp trades once, including after restart. UseEntryTrendFilter controls the gate; confidence may still use Candle direction with the gate off. UI BUY/SELL colors follow CandleTrendTimeframe; the label timeframe remains CandleTimeframe. EntryCandle includes Candle in the shared AND/OR combination as in v1.98. OR requires at least one nonzero signal and no opposing direction; AND requires every selected source to be nonzero and aligned. Priority is pending CHoCH, otherwise BF, combined first Entry, then Candle joining a chain. No independent Candle companion follows an ordinary Entry in the same engine pass. Candle shares the managed-fill clock for OpenOnNewCandle/OpenDelaySeconds. A pattern rejected by spread or trading hours is discarded until a new Candle bar; technical data failures remain retryable. Confidence uses EMA, MACD and structure on TrendTimeframe as in v1.98; opposing nonzero directions make the context neutral and remove the 20 trend points. CandleTrendTimeframe still controls the Candle permission filter, not those confidence points. A BF/Candle chain-add may have a DCA companion only when PreventSpecialEntryDcaSameTick permits and the prior request has settled.
| Input | Default | Meaning | Example / notes |
|---|---|---|---|
| NotifyCandleSignal | false | Send 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. |
| NotifyCandleSignalDetection | false | Send Push and Alert when a Candle pattern passes context and confidence checks. | SIGNAL does not guarantee entry: actual SL/TP are validated at submission; target barriers are checked only when UseCandleTPBarrier=true. R:R is informational and does not filter Candle entries. SIGNAL states that SL/TP will be checked at submission; ORDER uses the confirmed fill and final stops. Nonzero SL/TP chart levels appear when the request plan is valid, before fill confirmation. |
26. 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.
| Input | Default | Meaning | Example / notes |
|---|---|---|---|
| ShowSelfAwareTrend | false | Toggle 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 or the license is invalid; 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. |
| ShowSelfAwareTPSLLevels | false | Show 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, including with an invalid 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. |
| SelfAwareBullColor | clrLimeGreen | SelfAwareTrend line color in an uptrend. | Default LimeGreen; choose in Inputs. |
| SelfAwareBearColor | clrTomato | SelfAwareTrend line color in a downtrend. | Default Tomato; use the Bull color for a single-color line. |
| UseSelfAwareAutoSLTP | false | For 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. |
27. 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. Entry/DCA use TrendTimeframe; Dedicated Candle (EntryCandle=true) uses its own CandleTrendTimeframe with the same settings, weights and TrendFilterMode. HTF components keep HigherTimeframe.
| Input | Default | Meaning | Example / notes |
|---|---|---|---|
| UseEmaFilter | true | Enable EMA with shared indicator settings across trend paths. | Regular Entry/DCA read closed TrendTimeframe buffers; Dedicated Candle (EntryCandle=true) has its own CandleTrendTimeframe buffers. Periods and optional time window are shared. Invalid/empty readings return 0 points; Consensus blocks while Score combines remaining filters. |
| ShowEmaOnChart | false | Draw 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. |
| EmaPeriod1 | 34 | Manual fast EMA period; defaults come from the current configuration. | Directly effective only when TrendStrategySuggestion=NONE. |
| EmaPeriod2 | 89 | Manual slow EMA period; defaults come from the current configuration. | Directly effective only when TrendStrategySuggestion=NONE. |
| EmaPeriod1Color | clrDodgerBlue | EMA 1 line color. | Color does not affect trend logic; change it in Inputs. |
| EmaPeriod2Color | clrOrangeRed | EMA 2 line color. | Color does not affect trend logic; change it in Inputs. |
| UseEmaTimeWindow | false | Restrict the EMA filter to a time window. | false applies it at all times. |
| EmaWindowStart | 11:00:00 | Server-time EMA window start. | Neutral outside the window. |
| EmaWindowEnd | 21:00:00 | Server-time EMA window end. | Neutral outside the window. |
28. 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.
| Input | Default | Meaning | Example / notes |
|---|---|---|---|
| UseMacdFilter | true | Enable MACD with shared indicator settings across trend paths. | Entry/DCA use closed TrendTimeframe buffers; Dedicated Candle (EntryCandle=true) uses separate CandleTrendTimeframe buffers. Periods, MacdFlipGuard and time window are shared. Invalid main/signal values return 0 points. |
| ShowMacdOnChart | false | Show MACD in a separate chart subwindow. | Visible only when chart timeframe matches TrendTimeframe. Changing away removes it; changing back redraws it. |
| MacdFastEma | 12 | Manual MACD fast EMA period; BALANCED defaults are 12/26/9. | Directly effective in NONE; Fast must be less than Slow. |
| MacdSlowEma | 26 | Manual MACD slow EMA period; BALANCED defaults are 12/26/9. | Directly effective in NONE; Fast must be less than Slow. |
| MacdSignalSma | 9 | Manual MACD signal SMA period; BALANCED defaults are 12/26/9. | Directly effective in NONE; Fast must be less than Slow. |
| MacdPrice | PRICE_CLOSE | Applied price. | Uses closing price. |
| MacdFlipGuard | 0 | Minimum main-signal distance. | 0 disables the guard. |
| UseMacdTimeWindow | false | Restrict MACD to a time window. | Neutral outside the window. |
| MacdWindowStart | 11:00:00 | Server-time MACD window start. | Can differ from the EMA window. |
| MacdWindowEnd | 21:00:00 | Server-time MACD window end. | Can differ from the EMA window. |
29. 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.
| Input | Default | Meaning | Example / notes |
|---|---|---|---|
| UseAdxFilter | true | Enable ADX + DI on TrendTimeframe. | ADX below the threshold returns neutral; +DI greater than -DI gives BUY, and -DI greater than +DI gives SELL. All three closed-candle buffers must contain finite, non-empty values; otherwise the filter contributes 0. Dedicated Candle (EntryCandle=true) uses its own CandleTrendTimeframe for the main indicators with the same TrendFilterMode; HTF components keep HigherTimeframe. |
| AdxPeriod | 14 | Manual ADX period; BALANCED defaults are 14/22 for period/strength. | The source guide describes strength thresholds around 20–25 for filtering weak markets. |
| AdxMinStrength | 22.0 | Manual minimum ADX strength; BALANCED period/strength defaults are 14/22. | Thresholds around 20–25 are described for filtering weak markets. |
| UseMarketStructureTrendFilter | true | Enable closed-candle market structure filtering. | Checks CHoCH, then BOS, then HH/HL or LH/LL using the latest two confirmed swing highs and lows. Uses TrendTimeframe; the independent Bias entry trend filter uses HigherTimeframe. WAIT DATA means history is incomplete or not synchronized; NO SWINGS means the full window has fewer than two confirmed highs or lows; NEUTRAL means the available structure has no direction. Each contributes 0 points and prevents Consensus agreement; Score still combines the other enabled filters. Rechecks on subsequent calls without keeping an old direction. Chart CHoCH uses a separate EntryTimeframe calculation. Dedicated Candle (EntryCandle=true) uses its own CandleTrendTimeframe for the main indicators with the same TrendFilterMode; HTF components keep HigherTimeframe. |
| MarketStructureLookback | 80 | Manual structure lookback; BALANCED defaults are 80/3 for lookback/strength. | Requires the complete synchronized window of closed candles, at least max(effective lookback, 2 × effective strength + 6). A partial window is not scored. Higher swing strength reduces noise but responds more slowly. |
| MarketStructureSwingStrength | 3 | Manual swing strength; BALANCED defaults are 80/3 for lookback/strength. | Higher strength reduces noise but responds more slowly. |
| UseHtfAlignmentFilter | true | Enable EMA confirmation on HigherTimeframe. | Compares closed HigherTimeframe EMA buffers. Empty or non-finite values contribute 0 rather than BUY/SELL. |
| HtfAlignmentFastEma | 50 | Manual fast HTF EMA; BALANCED defaults are 50/200. | Independent of Bias Filter EMAs. |
| HtfAlignmentSlowEma | 200 | Manual slow HTF EMA; BALANCED defaults are 50/200. | Independent of Bias Filter EMAs. |
| UseVwapTrendFilter | true | Enable VWAP Trend Filter on TrendTimeframe. | BUY requires a close above rolling VWAP and sufficient upward VWAP slope; SELL uses the opposite conditions. Requires the complete synchronized candle window; unavailable data contributes 0. Dedicated Candle (EntryCandle=true) uses its own CandleTrendTimeframe for the main indicators with the same TrendFilterMode; HTF components keep HigherTimeframe. |
| VwapLookbackBars | 50 | Closed candles used for rolling VWAP. | VWAP uses typical price × tick volume. Reads max(VwapLookbackBars + 2, 15) closed candles so even lookback 10 has enough data for all 14 True Ranges used by the slope threshold. A longer VWAP lookback is steadier but slower. Dedicated Candle (EntryCandle=true) uses its own CandleTrendTimeframe for the main indicators with the same TrendFilterMode; HTF components keep HigherTimeframe. |
| VwapMinSlopeATR | 0.02 | Minimum VWAP slope as a fraction of ATR. | Filters out nearly flat VWAP using the arithmetic mean of 14 closed-candle True Ranges. Requires 15 closed candles and never shortens the ATR period when data is missing; 0 allows any slope with the correct sign. |
| UseVolumeProfileBias | true | Enable Volume Profile Bias using broker tick volume. | Compares POC in the recent part of the period with the earlier part, and price with the current POC. Requires the complete synchronized closed-candle window; unavailable data contributes 0. Dedicated Candle (EntryCandle=true) uses its own CandleTrendTimeframe for the main indicators with the same TrendFilterMode; HTF components keep HigherTimeframe. |
| VolumeProfileLookbackBars | 120 | Total closed candles in Volume Profile. | Uses all requested closed candles: the recent part has floor(N/2) candles and the earlier part has the remainder. For 31, compares 15 recent candles with 16 earlier candles; no oldest candle is dropped. Dedicated Candle (EntryCandle=true) uses its own CandleTrendTimeframe for the main indicators with the same TrendFilterMode; HTF components keep HigherTimeframe. |
| VolumeProfileBins | 48 | Number of price buckets for allocating tick volume. | 10–200; more bins give detail but increase sensitivity and computation. |
30.1. Bias - Enable and strategy gate
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. Bias/Key Levels neither gate regular Entry/Candle/DCA nor contribute to their trend score; UseBiasFilterForEntry controls independent |BF orders at Key Levels. Levels are detected only after a new HigherTimeframe candle closes. Selection refreshes on each EntryTimeframe candle: zones meeting the minimum score and, when enabled, Bias direction come first, ordered by distance to the zone bounds, then score for equal distances. Price must be inside the displayed bounds. Strong opposing protection checks all detected candidates, including hidden ones. With DebugLogEnabled=true, independent BUY/SELL BF rejection reasons are logged separately, at most once per side every 10 seconds when the reason or entry candle changes. The Bias direction gate applies in both SCORE and CONSENSUS (neutral directional zones remain allowed); UseBiasDirectionForEntry can disable this check for independent BF orders. Entries are blocked when the current HTF data, ATR, or enabled Bias EMA buffers are unavailable. Independent Bias orders also require the minimum level score, distance from existing Bias orders, and reuse/retest checks. 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 TrendFilterMode=Score, 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.
| Input | Default | Meaning | Example / notes |
|---|---|---|---|
| UseBiasFilter | true | Enable Bias and Key Level analysis, panel, and rectangles. | false disables analysis, hides the panel/rectangles, and disables both the trend gate and |BF orders. |
30.2. Bias - Entry and lot sizing
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. Bias/Key Levels neither gate regular Entry/Candle/DCA nor contribute to their trend score; UseBiasFilterForEntry controls independent |BF orders at Key Levels. Levels are detected only after a new HigherTimeframe candle closes. Selection refreshes on each EntryTimeframe candle: zones meeting the minimum score and, when enabled, Bias direction come first, ordered by distance to the zone bounds, then score for equal distances. Price must be inside the displayed bounds. Strong opposing protection checks all detected candidates, including hidden ones. With DebugLogEnabled=true, independent BUY/SELL BF rejection reasons are logged separately, at most once per side every 10 seconds when the reason or entry candle changes. The Bias direction gate applies in both SCORE and CONSENSUS (neutral directional zones remain allowed); UseBiasDirectionForEntry can disable this check for independent BF orders. Entries are blocked when the current HTF data, ATR, or enabled Bias EMA buffers are unavailable. Independent Bias orders also require the minimum level score, distance from existing Bias orders, and reuse/retest checks. 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 TrendFilterMode=Score, 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. Every Candle plan is rechecked at the final request quote: valid broker-normalized SL/TP, nearest opposing S/R when UseCandleTPBarrier=true; R:R is informational and does not block Candle below 2R. SL=0 or TP=0 retains basket mode with RR=N/A. SAT Auto retains TP3=3R; a barrier blocks it only in Candle context when UseCandleTPBarrier=true. CS spacing considers only same-side CS; BF spacing considers only same-side BF. By default one open request is submitted per tick, except for an eligible OR regular Entry + Candle pair. PreventSpecialEntryDcaSameTick=false additionally permits one eligible DCA after a settled BF/CS fill, never a third request after the OR pair; STEP_CLOSE still requires a new bar.
| Input | Default | Meaning | Example / notes |
|---|---|---|---|
| UseBiasFilterForEntry | true | Allow BF entries at eligible Key Levels using the selected confirmation/retest policy. | ON/true (default): an unused zone needs the latest closed EntryTimeframe candle to overlap it, close beyond the favorable edge with a matching candle body, then the current price must retest inside during the next bar. OFF/false skips this first-use confirmation/retest; price must still be inside an eligible zone, with minimum score, BF spacing, opposing-level protection, trend and existing limits satisfied. BiasRequireZoneRetest separately controls reuse of traded zones. At most one BF per side per closed HigherTimeframe candle. |
| BiasFilterLot | 0.0 | Separate Bias order lot size. | 0 uses InitialLots; positive values are normalized/capped by broker rules and MaxLots. |
| BiasMinEntryDistanceATR | 1.5 | Minimum spacing to open same-side BF positions, using closed HTF ATR. | Only same-side BF positions count; Entry, DCA, CS and Balance are ignored. ATR=10 and multiplier 1.5 require 15 price units to every same-side BF. 0 disables spacing; enabled spacing needs valid ATR. Rechecked at the final request quote. |
| BiasMinLevelScore | 70 | Minimum key-level score for independent Bias entries, 0–100. | 70 rejects lower-scoring or penalized zones; ordinary Entry/Candle/DCA gates do not use this threshold. |
| BiasRequireFirstTouchRetest | true | Require closed-bar confirmation and retest for the first BF entry into a zone. | ON/true (default): an unused zone needs the latest closed EntryTimeframe candle to overlap it, close beyond the favorable edge with a matching candle body, then the current price must retest inside during the next bar. OFF/false skips this first-use confirmation/retest; price must still be inside an eligible zone, with minimum score, BF spacing, opposing-level protection, trend and existing limits satisfied. BiasRequireZoneRetest separately controls reuse of traded zones. |
| BiasRequireZoneRetest | true | Require an exit and directional retest before reusing a traded Bias zone. | Controls traded zones only: true requires a later candle to close outside, then a subsequent candle to close inside with the matching body direction. Consumption is recorded even when false and survives HTF rebuilds/restart, including overlapping replacement zones. BiasRequireFirstTouchRetest independently controls unused zones. |
30.3. Bias - Entry direction and trend filters
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. Bias/Key Levels neither gate regular Entry/Candle/DCA nor contribute to their trend score; UseBiasFilterForEntry controls independent |BF orders at Key Levels. Levels are detected only after a new HigherTimeframe candle closes. Selection refreshes on each EntryTimeframe candle: zones meeting the minimum score and, when enabled, Bias direction come first, ordered by distance to the zone bounds, then score for equal distances. Price must be inside the displayed bounds. Strong opposing protection checks all detected candidates, including hidden ones. With DebugLogEnabled=true, independent BUY/SELL BF rejection reasons are logged separately, at most once per side every 10 seconds when the reason or entry candle changes. The Bias direction gate applies in both SCORE and CONSENSUS (neutral directional zones remain allowed); UseBiasDirectionForEntry can disable this check for independent BF orders. Entries are blocked when the current HTF data, ATR, or enabled Bias EMA buffers are unavailable. Independent Bias orders also require the minimum level score, distance from existing Bias orders, and reuse/retest checks. 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 TrendFilterMode=Score, 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.
| Input | Default | Meaning | Example / notes |
|---|---|---|---|
| UseBiasDirectionForEntry | false | Require independent BF entries to agree with the scored HigherTimeframe Bias direction. | true blocks SELL in BULLISH Bias and BUY in BEARISH Bias; neutral directional zones retain the existing policy. false allows either side at its qualified zone and ranks nearby zones without Bias direction preference. Zone score, distance, retest, opposing zones and separate manual/AUTO HTF trend confirmation remain in force. Ordinary Entry/Candle/DCA Bias gates keep their direction check. |
| UseTrendFilterForBiasEntry | false | Add 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. Recalculates on every call so recovered buffers and EMA/MACD time-window changes apply at the next evaluation, without a 10-second score cache. The Bias panel shows direction and SCORE/MIN. With UseAutoTrendFilterForBiasEntry=true, automatic mode controls the actual state without rewriting this manual input. |
| UseAutoTrendFilterForBiasEntry | true | Automatically 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. |
| BiasTrendDailyRangeThreshold | 100.0 | Current 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. |
30.4. Bias - HTF analysis and key levels
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. Bias/Key Levels neither gate regular Entry/Candle/DCA nor contribute to their trend score; UseBiasFilterForEntry controls independent |BF orders at Key Levels. Levels are detected only after a new HigherTimeframe candle closes. Selection refreshes on each EntryTimeframe candle: zones meeting the minimum score and, when enabled, Bias direction come first, ordered by distance to the zone bounds, then score for equal distances. Price must be inside the displayed bounds. Strong opposing protection checks all detected candidates, including hidden ones. With DebugLogEnabled=true, independent BUY/SELL BF rejection reasons are logged separately, at most once per side every 10 seconds when the reason or entry candle changes. The Bias direction gate applies in both SCORE and CONSENSUS (neutral directional zones remain allowed); UseBiasDirectionForEntry can disable this check for independent BF orders. Entries are blocked when the current HTF data, ATR, or enabled Bias EMA buffers are unavailable. Independent Bias orders also require the minimum level score, distance from existing Bias orders, and reuse/retest checks. 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 TrendFilterMode=Score, 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.
| Input | Default | Meaning | Example / notes |
|---|---|---|---|
| BiasLookbackBars | 150 | Closed HTF candles used for analysis. | Requires the complete synchronized window of max(BiasLookbackBars, BiasSlowEMAPeriod + 10) closed HTF candles before saving analysis. Defaults 150 and 200 require 210 candles, all used in detection. Partial or invalid data is retried on subsequent calls in the same HTF bar; shift 0 is excluded. |
| SwingStrengthBars | 3 | Bars required on each side to confirm a swing. | Higher values detect larger/slower swings. |
| MaxKeyLevels | 6 | Number of highest-scoring levels retained. | Select nearest eligible zones first; strong opposing zones still protect entries even when outside this display limit. |
| BiasFastEMAPeriod | 50 | Separate fast EMA for HTF Bias. | Fast must be less than Slow. |
| BiasSlowEMAPeriod | 200 | Separate slow EMA for HTF Bias. | Fast must be less than Slow. |
30.5. Bias - Chart display and colors
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. Bias/Key Levels neither gate regular Entry/Candle/DCA nor contribute to their trend score; UseBiasFilterForEntry controls independent |BF orders at Key Levels. Levels are detected only after a new HigherTimeframe candle closes. Selection refreshes on each EntryTimeframe candle: zones meeting the minimum score and, when enabled, Bias direction come first, ordered by distance to the zone bounds, then score for equal distances. Price must be inside the displayed bounds. Strong opposing protection checks all detected candidates, including hidden ones. With DebugLogEnabled=true, independent BUY/SELL BF rejection reasons are logged separately, at most once per side every 10 seconds when the reason or entry candle changes. The Bias direction gate applies in both SCORE and CONSENSUS (neutral directional zones remain allowed); UseBiasDirectionForEntry can disable this check for independent BF orders. Entries are blocked when the current HTF data, ATR, or enabled Bias EMA buffers are unavailable. Independent Bias orders also require the minimum level score, distance from existing Bias orders, and reuse/retest checks. 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 TrendFilterMode=Score, 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.
| Input | Default | Meaning | Example / notes |
|---|---|---|---|
| ShowKeyLevelsOnChart | true | Draw 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. |
| ShowBiasSupport | true | Show/hide Support on the chart and Bias panel. | Display only; levels still participate in trading logic. |
| BiasSupportColor | clrSeaGreen | Support zone color. | Change directly in Inputs. |
| ShowBiasResistance | true | Show/hide Resistance on the chart and Bias panel. | Uses BiasResistanceColor when enabled. |
| BiasResistanceColor | clrDeepPink | Resistance zone color. | Default deep pink. |
| ShowBiasBullishFvg | true | Show/hide Bullish FVG. | Uses BiasBullishFvgColor. |
| BiasBullishFvgColor | clrDodgerBlue | Bullish FVG color. | Display only. |
| ShowBiasBearishFvg | true | Show/hide Bearish FVG. | Uses BiasBearishFvgColor. |
| BiasBearishFvgColor | clrOrange | Bearish FVG color. | Display only. |
| ShowBiasLiquidity | true | Show/hide Liquidity High/Low. | Both use BiasLiquidityColor. |
| BiasLiquidityColor | clrGold | Liquidity High/Low color. | Shared by both liquidity types. |
| ShowBiasBuyZone | true | Show/hide bullish OB, Fibonacci discount, and other BUY zones. | Uses BiasBuyZoneColor. |
| BiasBuyZoneColor | clrSeaGreen | Color of other BUY zones. | Bullish OB, Fibonacci discount, and other BUY levels. |
| ShowBiasSellZone | true | Show/hide bearish OB, Fibonacci premium, and other SELL zones. | Uses BiasSellZoneColor. |
| BiasSellZoneColor | clrTomato | Color of other SELL zones. | Bearish OB, Fibonacci premium, and other SELL levels. |
31. 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.
| Input | Default | Meaning | Example / notes |
|---|---|---|---|
| UseZoneCycle | false | Enable the zone filter. | false removes zone lines. |
| UseZoneCycleByAI | false | Choose AI or manual zones. | Manual lines can be dragged. |
| BuyZoneUpper | 0 | Upper BUY boundary. | 0 leaves this boundary unrestricted. |
| BuyZoneLower | 0 | Lower BUY boundary. | 0 leaves this boundary unrestricted. |
| SellZoneUpper | 0 | Upper SELL boundary. | Only the latest line is retained. |
| SellZoneLower | 0 | Lower SELL boundary. | Only the latest line is retained. |
| ZoneAiApiKey | Gemini API key. | Do not share presets containing the key. | |
| ZoneAiModel | gemini-3.6-flash | API model identifier. | An incorrect model may return 404. |
| ZoneAiTimeoutMs | 30000 | Timeout in milliseconds. | Increase for slow networks. |
| ZoneAiBarCount | 48 | HTF candles sent to AI. | More candles increase payload size. |
32. 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.
| Input | Default | Meaning | Example / notes |
|---|---|---|---|
| UseNewCycle | true | Enable the scheduled cycle lock. | false ignores the schedule. |
| NewCycleDay | MATS_CYCLE_FRIDAY | Day to lock new cycles. | Uses server time. |
| NewCycleOffTime | 09:00:00 | Time to lock new cycles. | HH:MM:SS. |
33. Time limit (server time)
Entry opening windows in server 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.
| Input | Default | Meaning | Example / notes |
|---|---|---|---|
| UseTimeLimit | false | Enable time limits. | false allows all hours. |
| UseTimeWindow1 | true | Enable window 1. | Can cross midnight. |
| Window1Start | 01:00:00 | Window 1 start. | Server time, HH:MM:SS. |
| Window1End | 11:30:00 | Window 1 end. | Server time, HH:MM:SS. |
| UseTimeWindow2 | false | Enable window 2. | Can cross midnight. |
| Window2Start | 14:30:00 | Window 2 start. | Server time, HH:MM:SS. |
| Window2End | 18:30:00 | Window 2 end. | Server time, HH:MM:SS. |
| UseTimeWindow3 | false | Enable window 3. | Can cross midnight. |
| Window3Start | 20:30:00 | Window 3 start. | Server time, HH:MM:SS. |
| Window3End | 23:30:00 | Window 3 end. | Server time, HH:MM:SS. |
| UseTimeWindow4 | false | Enable window 4. | Can cross midnight. |
| Window4Start | 02:30:00 | Window 4 start. | Server time, HH:MM:SS. |
| Window4End | 05:30:00 | Window 4 end. | Server time, HH:MM:SS. |
| AllowDcaOutsideHours | true | Allow DCA outside trading hours. | Does not open new chains. |
34. Trade sessions
Session information on the dashboard.
Processing logic: Does not replace Time Limit. Real sessions use UTC/DST; custom sessions use server time.
| Input | Default | Meaning | Example / notes |
|---|---|---|---|
| UseSessionInfo | true | Enable session information. | Disabling reduces UI information. |
| UseRealMarketSessions | true | Use real sessions with daylight-saving adjustments. | false uses custom hours. |
| TokyoStartHour | 2 | Custom Tokyo start hour in server time. | Used only when UseRealMarketSessions=false. |
| LondonStartHour | 9 | Custom London start hour in server time. | Used only when UseRealMarketSessions=false. |
| NewYorkStartHour | 14 | Custom NewYork start hour in server time. | Used only when UseRealMarketSessions=false. |
| SydneyStartHour | 21 | Custom Sydney start hour in server time. | Used only when UseRealMarketSessions=false. |
35. 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.
| Input | Default | Meaning | Example / notes |
|---|---|---|---|
| RemotePausePrice | 999999 | BUY STOP at this price pauses the EA. | The EA recognizes and deletes the pending order. |
| RemoteResumePrice | 666666 | BUY STOP at this price resumes the EA. | Test on demo. |
| RemoteNewCyclePrice | 888888 | BUY STOP disables New Cycle; SELL LIMIT enables it. | OFF blocks new chains; ON permits new chains again. |
| RemoteStopSidePrice | 555555 | BUY 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. |
36. K Forecast (API chart)
Display only the latest forecast using broker candle history; never places orders.
POST to https://matsea.metatechsolutions.vn/api/forecast with Authorization: Bearer, Content-Type: application/json and Accept: application/json. Endpoint and authentication are configured internally, with no editable inputs in this group. JSON sends symbol=GOLD, timeframe from the selected TF (for example M15), pred_len from the prediction count, temperature=1.0, top_p=0.9, sample_count=1 and candles. Each candle contains timestamp, open, high, low, close and volume. UTC ISO 8601 timestamps subtract the current TimeTradeServer() - TimeGMT() offset rounded to a minute from broker candle-open time; history spanning DST transitions may require service support. Uses UTF-8 without a terminating NUL. Allow https://matsea.metatechsolutions.vn in Tools > Options > Expert Advisors > Allow WebRequest for listed URL. Requires connection and valid server/UTC clocks; Strategy Tester performs no API calls or drawing. The response must contain symbol GOLD, a matching timeframe and forecast entries with timezone-qualified timestamp and valid positive close; other metadata is not used for drawing. Connects close values, or shows a dot for one point, using API prices directly and shifting UTC to server time. Offset changes redraw cached data; enables 35% chart shift. Temporary disconnection or invalid server/UTC clocks retain unexpired forecast data and drawings, pause new requests and redraw immediately from cache after time recovers, without waiting for the refresh interval. Cache expires even if UTC is unavailable, using a monotonic deadline. HTTP/WebRequest/JSON failures during an actual API call still clear data. [FORECAST][CLOCK] logs distinguish disconnection, missing server time, missing UTC and offsets outside ±14 hours, including clock values for diagnosis; no fixed 7-hour correction is applied. For non-200 HTTP responses, Alerts and [FORECAST] logs show the HTTP status, parsed error.code, server message and request_id when available. Allow-WebRequest instructions appear only for MT5 WebRequest failures. invalid_request: check symbol/timeframe, 2-512 candles, timestamp order/spacing, OHLCV and parameter limits. unauthorized: check the Bearer token. payload_too_large: reduce candles or body size (512 KiB limit). unsupported_media_type: use application/json. rate_limited: wait for Retry-After (60 seconds) and do not retry continuously. unavailable: check service configuration/executor. busy: wait for the current worker. learning_unavailable: check server learning-state storage and logs. forecast_failed: check model/device/server logs. timeout: wait for inference to finish; the worker may remain occupied. internal_error: send request_id to the administrator. http_error: check the URL and POST /api/forecast. Other or malformed error bodies show the HTTP status and explain that no valid error.code was found. With DebugLogEnabled=true, configuration is logged at initialization/Inputs application and the full JSON before each API call as [FORECAST][REQUEST i/n] chunks of up to 1000 characters; concatenate in order to recover the payload. Tokens/authentication headers are not logged. Cancellation is requested for legacy forecast pending orders; filled positions retain SL/TP and global protection.
| Input | Default | Meaning | Example / notes |
|---|---|---|---|
| UseForecast | false | Enable GOLD API forecasts on the chart selected by the forecast TF. Requires an active lifetime license. | Without an active lifetime license the EA shows the Alert "Please activate your account to use this feature." and draws nothing. Default false sends no request. true draws only on the EA chart while its timeframe matches ForecastTimeframe; on other timeframes the API is still called but nothing is drawn. The EA never opens a chart or changes the chart timeframe. Only the latest forecast is retained; no orders are placed. Disabling/removing the EA clears forecast drawings and leaves the chart open. |
| ForecastTimeframe | M15 | Timeframe for candle history, forecast display and API refresh; minimum M15. | Default M15. Choices: M15, M20, M30, H1, H2, H3, H4, H6, H8, H12, D1, W1, MN1; CURRENT is unavailable. M15 calls every 15 minutes, H1 every hour, measured from the previous attempt rather than candle-open boundaries. The first request waits for complete data; API failures also wait one TF duration before retrying. The service must support the selected TF. |
| ForecastHistoryBars | 400 | Number of closed candles sent in candles; 2..2048. | Default 400 candles from ForecastTimeframe. CopyRates starts at shift=1, excludes the current candle and sends oldest first. Incomplete history waits and retries rather than sending fewer candles. OHLC comes from the attached broker XAU/GOLD/PAXG symbol; volume is broker tick_volume. |
| ForecastPredictionBars | 24 | Number of future candles requested as pred_len; 1..2048. | Default 24, representing 24 M15 candles or 6 hours when TF is M15. Does not change the historical candle count. The API service may impose stricter limits. |
| ForecastTimeoutMs | 80000 | Synchronous HTTP timeout in milliseconds; 1000..120000. | Default 80000 ms = 80 seconds. Out-of-range values prevent API calls. WebRequest may pause EA event processing for the timeout duration; choose a value appropriate for service processing time. |
| ForecastPastBars | 10 | Past candles of the forecast line to display, 0 to 200; 0 turns it off. | For each candle that has started, the EA draws the latest forecast made before it, so you can compare it with the real price. The API only returns future candles, so points build up over time: 10 on M15 takes about 2.5 hours to fill. Points are saved to a file and survive a restart. |
| ForecastPastLineColor | clrRed | Color of the past section of the forecast line. | Default clrRed. Hover over a past segment for server time and the forecast Close. |
| ForecastLineColor | clrLimeGreen | Color of the future section of the forecast line and the final point. | Default clrLimeGreen; clrGold draws gold. Hover over a segment or final point for server time and High, Low, Close, Volume; missing fields show N/A. Each redraw removes older forecast drawings while preserving user objects. |
36.1. Account telemetry
Send account status snapshots to the license server for the account page.
Processing logic: The EA sends POST /api/v1/account/telemetry from OnTimer using the telemetry token issued by the license API, including status, permitted Bias direction and HTF trend filter state; the latest forecast is included only for an active lifetime license. Nothing is sent in the Strategy Tester, when TelemetryEmail is empty, without a token, or during a broker operation. The timeout is 3 seconds; failures back off up to 15 minutes. Server responses may carry an Only Buy/Only Sell command from the account page, so the EA receives commands on this same cycle. The license server URL must be listed under Allow WebRequest.
| Input | Default | Meaning | Example / notes |
|---|---|---|---|
| UseTelemetry | true | Send account status snapshots to the server. | TelemetryEmail is required. Accounts on the lifetime activation list do not receive a token, so they send nothing. |
| TelemetryIntervalSeconds | 60 | Seconds between snapshots, 30 to 3600. | WebRequest is synchronous: a shorter interval makes the EA wait on the network more often. |
| TelemetryEmail | "" | Portal email sent with the license check; required when UseTelemetry=true. | Required when UseTelemetry=true: if empty, the EA shows an Alert asking for the email and holds back snapshots while trading continues. The email is stored only when the license has none; if it differs from the stored email the server issues no token and the administrator must change it. An invalid format stops the EA from starting. Not sent when UseTelemetry=false. |
37. Debug
Diagnostic logging. Repetitive Bias analysis, level lifecycle and BF rejection messages are removed; panel statuses remain.
Processing logic: Important events are always logged. Enable Debug to see why signals or gates reject an entry.
| Input | Default | Meaning | Example / notes |
|---|---|---|---|
| DebugLogEnabled | false | Enable debug logging, including technical diagnostics. | When enabled, writes [MATS] [FORECAST][INPUTS] once at initialization or after applying Inputs, showing all group 36 inputs and the derived refresh interval even when UseForecast=false. The authentication token is shown only as [MASKED] or [EMPTY], never its real value. Before each actual API attempt, [FORECAST][REQUEST i/n] logs the complete outgoing JSON, including UTC timestamps and OHLCV for every candle, in chunks of at most 1000 characters. Concatenate chunk contents in order to recover the full JSON. Authorization headers are not logged. false suppresses dedicated Bias/BF logs. Repetitive Bias analysis, level lifecycle and BF rejection logs are removed; failures and panel statuses remain available. It also reports [MATS][PERF] timings for UI, history, EMA/Bias/SAT rendering and AI/license network calls taking at least 100 ms, at most once per category per minute. Dashboard and Bias panel refresh about once per second; control clicks force immediate feedback. Chart panels and trading checks remain active. |