SSBODynamicBreakoutBox
This is an indicator based on Stairstep Breakouts trading system.

Build the consolidation zone

TimeFrame: The timeframe used for calculating the consolidation zones.
BoxLength: Minimum number of bars for a valid consolidation zone.
BoxRange: Maximum height for a valid consolidation zone. it refers to pips.
BoxBuffer: Margin above and below a consolidation zone, beyond which an entry is triggered.
AutoReduceCZ: A consolidation zone is narrowed within its highest and lowest points. False means BoxRange defines its height.

Entry and exit conditions

MagicNumber: The virtual trades can be copied by Rossbot. In this case the magic number and chart timeframe should be the same as Rossbot.
MaxEntryDistance: Entry distance from breakout level should not exceed the defined value. 0 disables this option.
MaxEntryDistanceType: Type of MaxEntryDistance. It can be pips, multiplier of ATR, multiplier of CZ height or multiplier of stop loss value.
AnchorCandle: We set an anchor at the open price of the current candle. The first breakout trade should open above it for longs or below it for shorts.
AnchorCandleTF: The timeframe of anchor candle.
InitialBreakoutDirectionOnly: All trades of a consolidation zone should have the same direction as the first one.
LongTrades: Long trades are allowed.
ShortTrades: Short trades are allowed.
ForcedOppositeDirection: During a consolidation zone, each trade should have the opposite direction of the previous one.
MinBarsClosedOutside: 0 means an entry signal is valid when price exceeds the buffer zone, a value of 1 or greater defines the number of bars that should close beyond the buffer lines for a valid entry.
EMAFilter: An entry is valid when real time moving average also reaches the level of the entry signal.
ReverseLogic: The direction of the trades is reversed and a trade has an effect to the trading logic as if it had the opposite direction.

Build the trading grid

QuickTakeProfit: Take profit of the first trade of a trade sequence.
QuickTakeProfitType: Type of QuickTakeProfit.
ModifyTakeProfit: After the first trade of a tradeset the take profit value is modified so that it is no less than the greatest stop loss value among all trades of this tradeset.
ResetBoxSize: After a trade set is completed, if the defined number of bars lies within the extended consolidation zone, a new trade set is allowed to occur.
MaxTradeSetReversals: Maximum allowed trades of a trade set.
StopLossOverride: If it is greater than zero, it defines stop loss in pips and the opposite border of the consolidation zone is not used as stop loss.
FIB_TP: Fibonacci sequence ratios used to calculate the respective levels.

Optimization settings

AutoOptimize: True means the indicator automatically finds the most profitable settings combination.
UpdateEveryBars: Auto-optimization is automatically repeated after the defined bars interval.
UpdateMode: Always means optimization starts at UpdateEveryBars intervals, CompleteTradeset means that we additionally need a completed tradeset, NoOpenTrades means no open trades should also exist.
BreakoutPercentageTarget: When auto-optimization is performed, no settings combinations are taken into account if their percentage winning trades are below this number.
If AutoOptimize is true then TestBoxLength, TestBoxRange, TestBoxBuffer, TestAutoReduceCZ, TestMinBarsClosedOutside, TestEMAFilter, TestQuickTakeProfit, TestMaxTradeSetReversals and TestMAPeriod options can take a range of values which are used for optimization. The minimum and maximum value are seperated by "-". For example "7-13". If no range is set, the indicator sets the range automatically.

Trading hours settings

All hour based settings are in hhmmhhmm format and refer to GMT. The first four digits define the start time and the last four digits the end time. Up to three trading sessions can be used. Set it to “00002400” to trade all day.

AutoGMTOffset: Difference between server time and GMT, defined automatically by the EA. It can’t be used during backtests.
ManualGMTOffset: Difference between server time and GMT, defined manually.
DSTOffset: If ManualGMTOffset is used, Daylight Saving Time correction is automatically applied according to the European Union rules.
TradingSession1: Trading hours restrictions for the first trading session.
TradingSession2: Trading hours restrictions for the second trading session.
TradingSession3: Trading hours restrictions for the third trading session.

Money management settings

CZResetMartingale: Martingale sequence resets when a new CZ is formed.
Martingale: Percentage means a LotMultiplier percentage is added to the lot size after a loss, Multiplication means the lot size is multiplied by LotMultiplier after a loss. Martingale is activated only after the initial lots of a trade are closed at loss because of stop loss.
LotMultiplier: Lot size increase factor in case of Martingale.
StartMartingaleAfterSL: The lot size change starts after the defined number of consecutive unprofitable closed trades.
MaxMartingaleSequence: The maximum number of consecutive martingaled trades.

Miscellaneous settings

FixedSpread: 0 means floating spread is used to calculate profit, otherwise the defined number is the spread.
FileName: It defines the name of the csv file that records the trades; spread is not taken into account.
SendEmail: For the first digit, 0 means no action, 1 means an action only when a trade is opened, 2 only when a trade is closed, 3 in both cases. For the second digit, 0 means no action, 1 means an action when a new CZ is formed.
SendNotifications: Digits explanation is the same as SendEmail.
ScreenShots: Digits explanation is the same as SendEmail.
Alerts: Digits explanation is the same as SendEmail.
AlertSound: User defined alert sound.