Expanded user guide • every EA section from first input group to last

PlutusPA PingPong v20.27

This guide explains all EA input sections in order, with numerical examples, practical purpose, importance, and clear differences between similar modules. All numbers are illustrative only and may vary by symbol, broker digits, execution model, and account conditions.

01BASIC - General Identity

This section defines the EA identity on the account. It prevents interference between different EA instances and defines the global trading direction.

InputExplanationNumerical example
Magic NumberIdentifies orders and positions managed by this EA.If Magic = 990001, the EA will not manage trades with Magic = 990002.
Strategy Instance IDOptional text ID for separating multiple setups on the same symbol.London setup = LON, New York setup = NY.
Trade Comment TagCustom text tag added to trade comments for tracking.PLUTUS-TEST or XAU-M15.
Trade DirectionGlobal direction permission: Buy Only, Sell Only, or Both.Buy Only blocks sell orders even if PingPong is allowed to sell.
Example: If Trade Direction = Buy Only, PingPong and the standard entry engine must respect it. Sell orders are not placed even if a sell retest is detected.
Importance: This is the first isolation layer. Wrong magic or instance settings can cause multiple setups to manage the same exposure incorrectly.

02BASIC - Lot and Position Size

This section controls position size and the price tolerance used to consider a level as touched.

InputPurposeExample
Base Buy LotMain lot size for buy positions.0.01 opens buy positions at 0.01 lot.
Base Sell LotMain lot size for sell positions.0.02 makes sell positions larger than buy positions if both directions are allowed.
Entry Touch ToleranceAllowed distance around a level to treat it as touched.If the level is 4000.00 and tolerance is 0.30, the touch zone is 3999.70 to 4000.30.
Lot-balance example: If Buy Lot = 0.01 and Sell Lot = 0.01, balanced hedge detection is easier. If Buy = 0.01 and Sell = 0.03, a larger hedge lot tolerance may be required.
Importance: Lot size affects basket results, equity protection, profit giveback, and balanced hedge exits. It is a risk foundation, not just an entry setting.

03BASIC - Trading Sessions

Trading sessions define when the EA is allowed to operate, using broker server time. Up to four separate sessions can be configured.

InputExplanationExample
Session 1 Start / EndMain trading window.08:00 to 12:00.
Session 2/3/4Optional additional windows.15:00 to 19:00 for a US-session window.
Broker Session Safety Buffer MinutesSafety buffer around broker market sessions to reduce market-closed errors.2 minutes avoids operations too close to session end.
Example: If Session 1 is 09:00-18:00 and server time is 18:03, the EA is outside the active session. The next action depends on Session End Behavior.
Importance: Sessions help avoid low-liquidity periods and end-of-day execution issues. This also helps reduce market-closed validation problems.

04BASIC - Session End Behavior

This section defines what the EA should do after a session ends. It does not define the trading window itself; it defines the action outside the window.

OptionMeaningNumerical example
KEEP ALLKeep positions and pending orders unchanged.2 open positions and 3 pending orders remain.
CANCEL PENDINGCancel pending orders only.A Buy position stays open, but Buy Limit/Sell Limit orders are removed.
CLOSE POSITIONSClose open positions.3 managed positions are closed.
CLOSE ALL + CANCELClose all positions and cancel all pending orders.Full cleanup at session end.
Close Profit / Close LossClose only profitable or losing positions while cancelling pending orders.Close profitable positions at +25 while leaving losing positions if configured that way.
Close Basket ProfitClose the basket if it is profitable at session end.If basket floating P/L is +12, the EA may close it.
Minimum-profit example: If Use Session Min Profit Close = true and the minimum is 10, a +8 basket will not be closed, while a +12 basket can be closed.
Difference from Daily Limits: Session End Behavior is time-window based. Daily Limits are result-of-day based.

05LEVEL ENGINE - Auto Anchor Source

This section builds the automatic level map around the Anchor. It is the main level source when Level Source Mode = Auto.

InputPurpose
Anchor TimeframeDefines the timeframe used to refresh the anchor and level map.
Level Source ModeAuto uses calculated levels; Manual uses user-provided levels.
Use Anchor LevelAdds the Anchor itself as an active level.
Upper / Lower Level CountNumber of upper/lower ratio levels to use.
Upper / Lower Expansion RatiosRatios that distribute levels around the Anchor.
Complete example:Anchor = 4000.00
Full Range = 10.00
Upper Ratios = 0.25, 0.50, 0.75, 1.00
Upper levels become 4002.50, 4005.00, 4007.50, and 4010.00. If Upper Level Count = 2, only 4002.50 and 4005.00 are used.
Use Anchor Level: If enabled, the map can include 3995.00, 3997.50, 4000.00, 4002.50, and 4005.00. If disabled, 4000.00 is not used as a working level.
Importance: The level engine defines the map. Entry Engine and PingPong use this map; they do not create independent price levels.

06LEVEL ENGINE - Renko / ATR Source

This section defines the size of the range used to build automatic levels. It controls the width of the map, not the center of the map.

InputExplanationExample
Range Bar TimeframeTimeframe used to calculate ATR/range data.M15 or M5.
Range ATR PeriodNumber of bars used for ATR calculation.14.
Range ATR AverageAdditional averaging/smoothing.1 means minimal extra smoothing.
Range Box MultiplierMultiplier applied to the range value.ATR = 8 and multiplier = 1.5 gives distance = 12.
Key difference: If Anchor Timeframe = M15 and Range Bar Timeframe = M5, the map center refreshes on M15 while the level spacing reacts to M5 volatility.
Importance: Too small a range can create levels too close together. Too large a range can reduce trading opportunities.

07LEVEL ENGINE - Manual Trigger Levels

This section is used when the trader wants to manually define the working levels. In Manual mode, the EA uses these lists instead of calculated auto levels.

InputExplanationInput example
Manual Buy Trigger LevelsLevels used to build buy-side logic.3990,4000,4010,4020
Manual Sell Trigger LevelsLevels used to build sell-side logic.4020,4010,4000,3990
Example: With manual levels 4000, 4010, and 4020, each neighboring pair becomes a working zone. Buy logic may use the lower level as entry and the upper level as trigger, while sell logic may do the opposite depending on the engine mode.
Importance: Manual mode is useful when you already have your own working levels and want the EA to manage orders around them.

08ENTRY ENGINE - Pending Orders

This section converts the active level map into pending orders. It does not calculate new levels; it decides how existing levels should be armed.

InputMeaningNumerical example
Pending Build ModeControls how pending orders are constructed from levels.With 4000 and 4010, the EA may wait for 4010 to be touched and then place Buy Limit at 4000.
Order Coverage ModeControls whether all qualified zones or only one pair is used.With 5 zones, All Qualified can arm several orders; Pair Only focuses on one area.
Nearest Trigger OnlyUses the nearest qualified trigger only.Current price 4005; it focuses on the nearest 4010/4020 zone.
Delete Opposite Pending On PositionDeletes opposite-side pending orders when a position opens.Buy position opened → sell pending orders can be removed.
Use Trigger CooldownPrevents repeated arming of the same trigger too quickly.Cooldown = 15 minutes.
Use Minimum Rearm DistanceRequires price to move away before the same area is armed again.Minimum Rearm = 5.0 price units.
Use Pending Order ExpirySets a time validity for pending orders.Expiry = 60 minutes.
Use Max Pending Per SideLimits buy and sell pending orders separately.Max Buy = 2 and Max Sell = 2.
Use Pending Margin GuardChecks margin before placing a new order.If free margin would drop below 25, the order is blocked.
Use Smart Pending CleanupRemoves old pending orders that no longer match the current map.A Buy Limit at 3950 may be removed if the new map is around 4000-4020.
Use Order Aging ProtectionRemoves pending orders that stay active too long.Max age = 180 minutes.
Practical example: Current price = 4000, levels = 3990 / 4000 / 4010 / 4020, Max Buy Pending = 1. If two buy opportunities are detected, only one buy pending order is allowed.
Difference from PingPong: This is the standard pending-order engine. PingPong is an additional retest engine between neighboring levels.

09ENTRY PROTECTION - Spread and Manual News

This section protects execution quality. Even if a valid entry exists, the EA can block it when spread or news time is unsuitable.

InputExplanationExample
Use Max Spread FilterBlocks new orders when spread is above the allowed value.Max Spread = 1.0; spread 1.8 blocks entries.
Cancel Pending If Spread Too HighRemoves pending orders when spread becomes too high.High news spread can cancel close pending orders.
Use Spread Shock ProtectionDetects sudden spread expansion.Normal spread 0.5 suddenly jumps to 2.0.
Spread Shock ActionAction when a spread shock is detected.Pause New Entries or Cancel Pending.
Spread Shock Cooldown MinutesWaiting time after a shock.5 minutes.
Use Manual News FilterManual broker-server-time news windows.15:25-16:10.
Manual News ActionAction during a news block.Pause New Entries or Cancel Pending.
Example: If a Buy Limit is close to price and spread jumps from 0.4 to 2.5, the EA can cancel the pending order to avoid bad execution.
Importance: These protections help avoid poor market conditions and reduce validation issues related to bad execution timing.

10ENTRY PROTECTION - Range Filter

The Range Filter measures market movement over a selected lookback. It decides whether the market is too quiet, normal, or too aggressive for new entries.

InputExplanationNumerical example
Range ModeMeasurement mode: Points, ATR, or Percent.Points uses the direct High-Low range.
Range TimeframeTimeframe used for the range measurement.M15.
Range Lookback BarsNumber of completed bars to measure.20 bars.
Use Minimum RangeBlocks trading if movement is too weak.Minimum = 10; Range = 6 is blocked.
Use Maximum RangeBlocks trading if movement is too aggressive.Maximum = 80; Range = 120 is blocked.
Range ATR settingsUsed when Range Mode = ATR.ATR = 12 and multiplier = 1.5 gives threshold = 18.
Full example: Last 20 M15 bars had high 4025 and low 4000, so Range = 25. If Minimum = 10 and Maximum = 60, entries are allowed. Range = 5 is too weak; Range = 100 is too aggressive.
Difference from Range Bar Timeframe: Range Bar Timeframe builds the level distance. Range Filter accepts or rejects new order placement.

11SL / TP / Trailing

This section controls protection for each individual position. It is different from Basket Management, which manages groups.

ModeMeaningExample
OFFNo protection of that type.Stop Loss Off means no SL from this section.
POINTSDistance-based protection.Buy from 4000 and SL Points = 10 gives SL near 3990.
PERCENTPercent of entry price.Buy 4000 and TP 1% gives TP near 4040.
ATRVolatility-based distance.ATR = 8 and multiplier 1.5 gives distance = 12.
Trailing example: Buy from 4000, trailing distance = 8. If price reaches 4020, SL may trail near 4012 depending on the trailing logic.
Importance: This is per-position protection. It can work independently from Basket, Daily, and Equity protections.

12BASKET MANAGEMENT

A basket is the group of open positions managed by the EA on the same symbol and magic/instance. Basket management evaluates the group rather than one individual trade.

InputPurposeExample
Basket Exit ModeBy-direction points or total floating money.Total Float Money closes if the basket reaches +50.
Use Basket Take ProfitCloses the basket at group profit.+20 +15 +18 = +53; target 50 closes.
Use Basket Stop LossCloses the basket at group loss.Total floating = -50; SL Money = 50 closes.
Basket Minimum PositionsMinimum position count before basket logic acts.If min = 2 and only one position is open, it does not act.
Use Balanced Hedge Profit ExitCloses balanced buy/sell hedge exposure when net profit is positive enough.Buy Lots 0.10, Sell Lots 0.10, net +7, minimum +5 closes.
Hedge Exit ModeInstant Close or Profit Lock.Profit Lock protects part of the hedge profit instead of closing immediately.
Close Balanced Hedge ModeClose all balanced positions or best matched group.With 6 positions, close only the best matched 2 buy + 2 sell group.
Hedge Balance ModeBalance by lots only or by lots and count.Buy 0.05+0.05 and Sell 0.10 is lot-balanced but not count-balanced.
Hedge Lot Balance ToleranceAllowed lot difference between buy and sell.Buy 0.20 and Sell 0.19 with tolerance 0.02 is balanced.
Hedge Count ToleranceAllowed count difference between buy and sell positions.Buy count 3 and Sell count 2 with tolerance 1 is accepted.
Hedge Lock Profit MoneyProfit amount to protect after lock activation.Hedge reaches +10 and lock protects +5.
Use Position Pressure ExitExits when too many positions exist and profit condition is met.8 positions and +20 profit can trigger pressure exit.
Balanced Hedge example: Buy 0.10 = +18 and Sell 0.10 = -10. Net = +8. If Minimum Hedge Net Profit Money = 5 and lot difference is zero, the EA closes the hedge group.
Profit Lock example: Balanced hedge reaches +12. If Hedge Lock Profit Money = 6 and Trail Distance = 3, the EA can let profit grow while protecting a portion of it.
Difference from Daily Profit: Basket sees current open positions. Daily Profit evaluates the whole trading day, including closed trades and optionally floating P/L.

13SAFETY - Daily Limits

Daily Limits protect the whole trading day based on broker server time. They are not limited to the currently open basket.

InputExplanationExample
Use Daily Profit LockStops or limits trading after daily profit target.Target = 100. If today reaches +100, Daily Profit Action is applied.
Daily Profit Includes FloatingWhether floating P/L is included in daily profit.Closed +80 and Floating +25 gives +105 if true.
Daily Profit ActionWhat to do after reaching the daily profit target.Pause New Entries or Close All Cancel Pending.
Use Daily Loss LimitDaily loss protection.Loss Limit = 100 triggers at -100.
Use Max Trades Per DayLimits total daily trades.Max = 20 blocks new entries after 20 trades.
Use Max Floating DrawdownLimits current floating drawdown.Floating DD = -120 and limit = 100 triggers action.
Difference example: Closed trades today = +70, floating positions = -20. If floating is included, daily result = +50. If not included, daily result = +70.
Importance: Daily Limits stop overtrading after a good or bad day.

14SAFETY - Equity Protection

Equity Protection monitors account equity or EA-managed floating P/L depending on the selected scope. It can protect profit peaks and account progress.

InputExplanationExample
Equity Control ScopeACCOUNT monitors account equity; MANAGED_FLOATING monitors EA-managed floating P/L only.Manual trades affect ACCOUNT but not MANAGED_FLOATING.
Equity Target Mode / ValueMoney or percent equity target.Start Equity 1000, target money 100 triggers near 1100.
Equity Trail StartWhen equity trailing becomes active.Start Value 30 activates after +30.
Equity Trail Distance MoneyAllowed pullback after trail starts.Peak 1080 and distance 20 gives protection near 1060.
Use Profit Giveback ProtectionTracks the highest peak and closes if equity gives back too much.Peak 1100 and giveback 50 closes near 1050 if conditions are met.
Minimum Peak Profit To ActivateProtection activates only after enough profit above the base.Base 1000 and minimum 30 means it activates at 1030+.
Minimum Open Positions To TriggerGiveback close requires enough open positions.Minimum 3; two positions will not trigger it.
After Giveback ActionWhat happens after closing.Restart, Pause Until Next Session, or Stop For Day.
Rearm Only After New PeakRearms only after a new equity peak is created.After close at 1050, it waits for a new peak before rearming.
Profit Giveback example: Account starts at 1000. Equity rises to 1100. New trades pull equity down to 1050. If Max Profit Giveback Money = 50 and at least 3 positions are open, the EA closes all and cancels pending orders to protect part of the previous profit.
Difference from Daily Loss: In this example the account is still +50 above start, so Daily Loss may not trigger. Profit Giveback triggers because equity gave back from the 1100 peak.

15ADVANCED - Cluster and Balanced Zone

This section prevents same-direction order/position crowding in a small area. It is an entry filter, not an exit system.

InputExplanationNumerical example
Use Same Direction Cluster FilterBlocks additional same-direction orders in crowded zones.Buy at 4000 and Buy at 4002 can block a new Buy at 4003 if distance is 5.
Cluster Count ModeCounts open positions, pending orders, or both.Open + Pending provides stronger density control.
Cluster Distance ModeFixed, ATR, or percent-of-price zone distance.Fixed = 5, ATR = 1.2 × ATR, Percent = 0.10% of price.
Max Same Direction Orders In ZoneMaximum same-direction exposure inside the zone.Max = 1 allows only one Buy in the local zone.
Use Balanced Zone ResetAllows state reset when the area becomes balanced.If buy and sell exposure becomes similar, the zone may be considered balanced.
Balanced Zone Can Bypass ClusterAllows balance to bypass the cluster block.If true, a balanced area may allow a new order even after a cluster block.
Balance Check ModeBalance by count or volume.Volume is better when lots are different.
Balance Count / Volume ToleranceAllowed difference between buy and sell exposure in the zone.Buy Lots 0.20 and Sell Lots 0.19 with tolerance 0.02 is balanced.
Example: Cluster Distance = 5. A Buy Limit exists at 4000 and a Buy position at 4003. If the EA tries to place another Buy at 4004, it is inside the 5-unit same-direction zone and can be blocked.
Key difference: Balanced Zone here does not close trades. It only informs entry filtering. Balanced Hedge Profit Exit is under Basket Management because it closes positions.

16PINGPONG - Neighbor Retest Engine

PingPong is an additional entry method that works between neighboring levels. When price touches a level, it can arm a retest order at the neighboring level.

InputExplanationExample
Use PingPong Retest EngineEnables or disables the engine.false disables PingPong.
Run With Standard Entry EngineRun PingPong together with the standard engine or separately.true means Standard + PingPong.
Allow PingPong Buy/Sell RetestsAllows buy-side or sell-side retests.Disable Sell Retests for buy-only retest behavior.
Arm Opposite Stop-LimitPrepares opposite logic around the neighbor level.A touched upper level can prepare a retest and an opposite action depending on settings.
Respect Cluster FilterMakes PingPong obey cluster restrictions.If a buy zone is crowded, PingPong does not add another buy.
Max PingPong Pending Per SideLimit PingPong pending orders per direction.1 allows one PingPong buy and one PingPong sell.
PingPong Touch TolerancePrice tolerance for level touch detection.0.5 means within half a price unit counts as touched.
PingPong Cooldown MinutesPrevents repeated touch handling too quickly.1 or 5 minutes depending on aggressiveness.
Numerical example: Levels are 3990, 4000, 4010. If price touches 4010, PingPong may arm a Buy Limit at 4000 for the retest. With opposite stop-limit enabled, it can also prepare opposite behavior around the neighboring level.
With Trade Direction: If Trade Direction = Buy Only, PingPong will not place sell orders even when sell retests are allowed.
Importance: PingPong is useful in markets that move between neighboring levels. It should usually be controlled with Cluster Filter, Max Pending, and Cooldown.

17DISPLAY - Anchor Levels

This section is chart-display only. It does not affect trading logic.

InputExplanation
Show Anchor LevelsShows or hides level lines.
Anchor ColorColor of the anchor line.
Resistance ColorColor of upper levels.
Support ColorColor of lower levels.
Example: Anchor = 4000 can appear in gold, upper lines at 4005 and 4010 in resistance color, and lower lines at 3995 and 3990 in support color.
Importance: It helps the user visually confirm why the EA placed or rejected a pending order.

18DISPLAY - Dashboard and Emergency Buttons

The dashboard is the monitoring center. It can display trading state, filter status, nearest levels, hedge exit state, Profit Giveback state, Safe Mode state, and setup quality.

InputExplanationExample
Show DashboardShows the information panel.true displays the dashboard.
Dashboard Font / Color / PositionControls dashboard appearance and location.Corner Left Upper, X=10, Y=20.
Show Nearest LevelsDisplays nearest active levels.Nearest Support 3995, Nearest Resistance 4005.
Show Setup Quality StatusDisplays Good / Warning / Blocked style state.Blocked because spread is too high or session is closed.
Show Emergency ButtonsShows chart buttons for quick manual control.Close All or Cancel Pending, depending on available buttons.
Show Safe Mode ButtonAdds a Safe Mode button that pauses new entries while open-position management continues.Safe Mode On blocks new entries, but Basket/Equity management can still operate.
Setup Quality example: If session is open, spread is acceptable, and range is suitable, status may show Good. High spread may show Warning. Closed session or daily lock may show Blocked.
Importance: The dashboard reduces confusion. It shows why entries are blocked or why an exit module is waiting.

19TESTER / DEBUG

This section is for testing and diagnostics. Heavy logging is not recommended for normal live operation because it can overload the Journal.

InputExplanationWhen to use
Enable Tester Validation AssistHelps Strategy Tester validation behavior.Useful for Market validation-style testing.
Log Anchor Refresh SummaryPrints a summary when levels refresh.When reviewing auto levels.
Print Startup SummaryPrints startup configuration summary.To confirm settings at launch.
Debug ModeEnables broader diagnostics.For troubleshooting only.
Print Trade DecisionsPrints trade decision details.To understand why an order was or was not placed.
Print Filter DecisionsPrints filter decision details.To identify spread/range/session blocks.
Importance: This section helps investigate MetaEditor or MQL5 Market validation issues, but it is not a trading logic section.

Differences Between Similar Sections

SectionWhat it doesPlaces orders?Closes positions?Quick example
Level EngineBuilds the level map.NoNoAnchor 4000 creates 3995 and 4005.
Entry EngineConverts levels into pending orders.YesUsually noPlaces Buy Limit at 4000.
Spread / News / Range FiltersAccept or reject entry environment.No, but allows/blocksCan cancel pending depending on actionSpread 2.0 blocks entry.
SL / TP / TrailingManages each individual position.NoYes, individual tradeBuy 4000, TP 4020.
Basket ManagementManages current open position group.NoYesCloses basket at +50.
Daily LimitsManages whole-day result.Blocks new entries after limitDepends on actionStops after +100 daily profit.
Equity ProtectionProtects equity or managed floating P/L.NoYes, if configuredPeak 1100 and pullback to 1050 closes.
ClusterBlocks crowded same-direction zones.No, but blocks additionsNoBlocks new Buy near old Buy.
PingPongAdditional neighbor retest entry engine.YesNoTouch 4010 arms retest at 4000.
DashboardDisplays status and manual controls.Only via buttonsOnly via buttons / monitoringShows Good/Blocked and Safe Mode.
Risk notice: This EA is an execution and management tool, not a profit guarantee. Test settings in Strategy Tester and on demo first, use conservative parameters, and check broker symbol conditions, spread, execution, and margin requirements.