Stoch Grid Pro EA
- Experts
- Gennady Filimonov
- Versione: 1.0
- Attivazioni: 5
Strategy Description
Modes of Operation:
-
Automatic Mode (EnableSemiAutoMode = false):
In this mode, the EA operates completely on its own. It uses its built-in trading strategy to determine entry points, opens the first order, and then manages it by handling the grid, locking, and position closure without trader intervention. -
Semi-Automatic Mode (EnableSemiAutoMode = true):
In this mode, you have full control over market entry, and the EA handles all the routine work of position management. This mode is ideal for traders who prefer to conduct their own market analysis and decide when to open the first trade. To enter a trade, simply press the "BUY" or "SELL" button on the information panel.
Once a button is pressed, Stoch Grid Pro EA immediately "catches" the opened order and begins automatic management: building a grid in case of adverse price movement, activating the locking system, and applying all configured exit rules.
Core Trading Logic (Post-Entry):
-
Entry Signal (Automatic Mode Only): The initial trade is opened when a pullback signal from the Stochastic oscillator aligns with a confirmation signal from the Higher Timeframe (HTF) trend filter.
-
Grid Management (Averaging): If a position moves into a loss, the advisor builds a grid of orders at a specified GridStepPips, averaging the price. The lot size can be multiplied using GridLotMultiplier.
-
Advanced Recovery System (Locking): After reaching the maximum number of grid orders (MaxGridOrdersBeforeLocking), the EA opens a hedge (locking) order to stop further loss. It then works to close positions in "pairs" (the oldest grid order + the lock order) or closes the entire series of trades upon reaching a total breakeven point.
Flexibility and Control:
-
Comprehensive Risk Management: Your capital is protected by multiple layers of security. The ultimate safety net is the Equity Stop Loss, which closes all positions if the floating drawdown exceeds a specified percentage of your balance or a fixed amount in your account currency.
-
Precision Filters: In automatic mode and when trading with buttons, you can use the Time Filter and Spread Filter to avoid trading in unfavorable conditions.
Key Features:
-
Two modes of operation: Fully Automatic and Semi-Automatic (via Buttons only).
-
Robust automatic entry signal (Stochastic + HTF MA Trend Filter).
-
Flexible grid system with a configurable lot multiplier.
-
Advanced Locking (Hedging) mechanism for drawdown control.
-
Multiple exit strategies: grid Take Profit, Pair Closure, and Total Breakeven.
-
Equity Stop Loss (% or fixed amount) as a critical safety feature.
-
Time and Spread filters for professional trading.
-
A stylish and informative on-chart panel with control buttons.
Disclaimer: This Expert Advisor uses grid and Martingale/locking elements, which are high-risk strategies. Past performance is not indicative of future results. We strongly recommend testing the EA on a demo account with various settings to fully understand its behavior and risk profile before using it on a live account. Start with the minimum possible risk settings. The user assumes full responsibility for using this software.
Settings Description
Lot Management
-
UseAutoLot (Use Auto Lot Calculation?): If true, the EA automatically calculates the initial lot. If false, FixedLot is used.
-
FixedLot (Fixed Lot Size): The initial lot size if autolot is disabled.
-
BaseDeposit (Base Deposit for Auto Lot): The deposit amount upon which BaseLot is calculated.
-
BaseLot (Lot size for Base Deposit): The lot size used for every unit of BaseDeposit.
-
MaxAllowedLot (Max Allowed Lot): The upper limit for the lot size of any order.
General Trading
-
TakeProfitPips (Grid Take Profit in Pips): The target profit in pips for the grid of orders (before lock activation).
-
Slippage (Slippage in Pips): The maximum allowed price deviation.
-
MagicNumber (EA Magic Number): A unique identifier for all orders opened by the EA (in both automatic mode and via buttons). It helps the EA distinguish its trades from others.
-
EnableSemiAutoMode (Enable Semi-Automatic Mode?):
-
false (Automatic Mode): The EA trades completely on its own based on its internal signals.
-
true (Semi-Automatic Mode): The EA disables its automatic trading logic and activates the on-chart buttons for manual entry. After a button is pressed, the EA will manage the opened position.
WTF Signal: Stochastic Oscillator (Automatic Mode Only)
This group of settings is only used if EnableSemiAutoMode = false.
-
Stoch_KPeriod / DPeriod / Slowing: Parameters of the Stochastic Oscillator.
-
Stoch_Method: Averaging method for the Stochastic.
-
Stoch_PriceField: Price field for the calculation.
-
Stoch_OverboughtLevel / OversoldLevel: Overbought and oversold levels.
HTF Filter: Moving Averages (Automatic Mode Only)
This group of settings is only used if EnableSemiAutoMode = false.
-
HTF_Timeframe: The timeframe for the trend filter.
-
HTF_FastMAPeriod / SlowMAPeriod: Periods for the fast and slow MAs.
-
HTF_MA_Method: Averaging method for the MAs.
-
HTF_Applied_Price: Price type for the MA calculation.
Grid Strategy
-
GridStepPips (Grid Step in Pips): The distance in pips to open the next order.
-
MaxGridOrdersBeforeLocking (Max Grid Orders Before Locking): The number of grid orders before switching to locking mode.
-
GridLotMultiplier (Lot Multiplier): The coefficient for lot calculation. >1=Martingale, =1=Same Lot, =0=Initial Lot.
Locking Strategy Settings
-
UseLockingStrategy (Enable Locking Strategy?): Enables locking mode after reaching MaxGridOrdersBeforeLocking.
-
LockOrderMagicNumber (Magic Number for Lock Orders): A unique identifier for locking orders. Must be different from MagicNumber.
-
PairCloseProfit (Profit to close PAIR): The target profit in account currency to close a pair (oldest order + lock order).
-
UseTotalBreakevenExit (Enable Total Breakeven Exit?): Enables monitoring of the total P/L of all positions for a simultaneous closure.
-
TotalBreakevenTargetProfit (Target for Total Breakeven): The target total profit to close all positions.
Trailing Stop Settings (Disabled when Lock is Active)
-
UseTrailingStop (Use Trailing Stop?): Enables the trailing stop for the grid before lock activation.
-
TrailingStartPips (Trailing Start in Pips): The profit in pips to activate the trailing stop.
-
TrailingStopPips (Trailing Distance in Pips): The distance to place the stop loss.
Risk Management
-
UseEquityStopLoss (Use Equity Stop Loss?): Enables the emergency closure of positions upon critical drawdown.
-
EquityStopLossPercent (Equity Stop Loss %): Stop loss as a percentage of the account balance. Has priority over the amount.
-
EquityStopLossAmount (Equity Stop Loss Amount): Stop loss as a fixed amount of floating loss in account currency.
-
UseMaxSpreadFilter (Use Max Spread Filter?): Prohibits opening the first order (in auto mode and via buttons) if the spread is too high.
-
MaxAllowedSpreadPips (Max Allowed Spread in Pips): The maximum allowed spread for opening the first trade.
Trading Time Filter (For Initial Orders)
-
UseTradingTimeFilter (Use Trading Time Filter?): Allows opening the first order (in auto mode and via buttons) only within the specified time range.
-
StartTradingHour / Minute: The start time for trading, based on your broker's server time.
-
EndTradingHour / Minute: The end time for trading, based on your broker's server time.
Information Panel Settings
-
ShowInfoPanel (Show Info Panel?): Displays the information panel on the chart.
-
Panel_Corner: The chart corner for the panel.
-
Panel_X_Offset / Y_Offset: The panel's offset from the corner.
-
Panel_Font_Size / Name: The font size and name.
-
Panel_BG_Color: The background color of the panel.
Manual Trade Buttons
-
ShowManualTradeButtons (Show Manual Trade Buttons?): Displays the "BUY" and "SELL" buttons. Note: The buttons will only be functional if EnableSemiAutoMode is set to true.
-
ButtonBuy_Text / ButtonSell_Text: Text on the buttons.
-
Button_Width / Height: Width and height of the buttons.
-
Button_X_Offset / Y_Offset_Buy / Y_Offset_Sell: Position of the buttons.
-
ButtonBuy_Color_BG / Text: Background and text color for the "BUY" button.
-
ButtonSell_Color_BG / Text: Background and text color for the "SELL" button
