Manual plan-x.cfg workflow
A saved plan CFG variable map for the single-file workflow where the tester reads values directly from plan-x.cfg.
For tester work, the workflow can be reduced to editing one plan-x.cfg, but only if linked child CFG files are removed or not used.
Right now plan-x.cfg is not just one independent file. It contains an embedded models pack plus the plan section, and at the end it also contains links.
When linked child CFG values are filled
models_cfg_name=q
start_cfg_name=q
end_cfg_name=q
box_cfg_name=q
time_cfg_name=q
ma_cfg_name=q
swing_cfg_name=qWhy this matters
If these links are filled and the corresponding files exist, Lazy Trader will additionally load the child CFG after loading plan-x.cfg and may override part of the values from the plan itself.
For a single-file workflow, leave the linked CFG names blank.
Single-file plan
models_cfg_name=
start_cfg_name=
end_cfg_name=
box_cfg_name=
time_cfg_name=
ma_cfg_name=
swing_cfg_name=Then the tester takes values directly from plan-x.cfg.
Below is the map of the current saved plan CFG. Important: in plan-x.cfg model fields are written as model_0_field_60, while in a separate model CFG they are written simply as field_60.
General rules
- 0/1 = false/true.
- <i> = model/row index, starts from 0.
- <t> = TP index, starts from 0.
- TF = MQL5 timeframe int: 1=M1, 5=M5, 15=M15, 30=M30, 16385=H1, 16388=H4, 16408=D1.
Models Pack inside Plan CFG
- pack_version = pack-section version; example 1.
- pack_label = pack/preset name; example q.
- history_depth = history depth for model/MA overlay; example 120.
- model_total = number of models in the plan; example 1.
- model_<i>_kind = model type: 1=TRB/BF, 2=LT/LW, 3=DR, 4=SMR, 5=MS, 6=MA, 7=BPR.
- model_<i>_show = show model/overlay on chart; 0/1.
- model_<i>_on = model enabled for calculation/trading; 0/1.
- model_<i>_once_auto = runtime auto-disable once flag; better not to generate manually.
- model_<i>_tf = model timeframe; example 5 for M5.
- model_<i>_user_label = custom model label.
- model_<i>_cfg_name = model CFG name; example q -> configs\MA-q.cfg for kind=6.
- model_<i>_basic_cfg_name = basic CFG name; example q -> configs\basic-q.cfg.
- model_<i>_be_enabled = BE enabled; 0/1.
- model_<i>_be_trigger = BE trigger in RR; example 0.5000.
- model_<i>_be_offset = BE offset in the model RR/points semantics; example 0.1000.
- model_<i>_min_sl_on = Min SL enabled; 0/1.
- model_<i>_min_sl_pts = Min SL points.
- model_<i>_max_sl_on = Max SL enabled; 0/1.
- model_<i>_max_sl_pts = Max SL points.
- model_<i>_min_sl_fractal_on = Min SL = fractal size; 0/1.
- model_<i>_tp_count = number of TP rows.
- model_<i>_tp1_plan_tp = use plan TP for TP1; 0/1.
- model_<i>_tp_rr_<t> = RR for TP t; example model_0_tp_rr_0=1.0000.
- model_<i>_tp_volume_pct_<t> = volume percent for TP t; example 20.0.
- model_<i>_field_<N> = model/basic parameter, map below.
- schema_first_count = number of models in FIRST schema.
- schema_first_kind_<i> = model kind in FIRST schema.
- schema_first_idx_<i> = index of this kind of model in FIRST schema.
- schema_then_count = number of models in THEN schema.
- schema_then_kind_<i> = model kind in THEN schema.
- schema_then_idx_<i> = index of this kind of model in THEN schema.
Common field_N for all models
- field_74 = risk_part; model risk share; example 0.1000.
- field_70 = min_sl_on; Min SL enabled; 0/1.
- field_71 = min_sl_pts; Min SL in points.
- field_72 = max_sl_on; Max SL enabled; 0/1.
- field_73 = max_sl_pts; Max SL in points.
- field_106 = min_sl_auto_on; auto Min SL enabled; 0/1.
- field_107 = min_sl_auto_mult; auto Min SL multiplier; example 1.0.
- field_108 = max_sl_auto_on; auto Max SL enabled; 0/1.
- field_109 = max_sl_auto_mult; auto Max SL multiplier; example 3.0.
- field_86 = min_sl_fractal_on; Min SL = fractal size; 0/1.
- field_87 = max_freq_on; Max frequency enabled; 0/1.
- field_110 = max_freq_minutes; pause between entries in minutes; example 45.
- field_88 = once_on; once per setup/session; 0/1.
- field_112 = max_pos_ignore_be_on; Ignore BE for max positions; 0/1.
- field_89 = spread_to_sl; Add x Spread to SL; example 2.
- field_101 = max_spread_on; Max spread filter enabled; 0/1.
- field_102 = max_spread; Max spread points.
- field_104 = max_spread_auto_on; auto Max spread enabled; 0/1.
- field_105 = max_spread_auto_mult; auto Max spread multiplier; example 0.5.
- field_99 = min_rr_on; Min RR enabled; 0/1.
- field_100 = min_rr; minimum RR; example 2.0.
TRB / BF, model_<i>_kind=1
- field_1 = TRB model/fractal type; 1=ST/Fractal, 2=IT, 3=LT.
- field_16 = TRB fractal mode; 3 or 5.
- field_17 = confirm TF; MQL5 timeframe int.
- field_2 = confirm mode; 1=body, 2=wick.
- field_3 = PD entry level; 0.0..1.0, legacy enum 1/2/3/4 maps to 0/.25/.5/.75.
- field_8 = SL level; 0.0..2.0.
- field_10 = lifetime minutes; example 120.
- field_13 = max positions.
- field_14 = BE trigger.
- field_15 = BE offset.
LT / LW, model_<i>_kind=2
- field_27 = LT model type; 2=Intermediate, 3=LongTerm.
- field_28 = LT fractal mode; 3 or 5.
- field_29 = lifetime minutes.
- field_75 = open on reversal; 0/1.
- field_76 = entry fib; example 1.0.
- field_77 = SL fib; example 2.0.
- field_22 = sweep range limiter.
- field_23 = SL max ticks.
- field_24 = max positions.
- field_25 = BE trigger.
- field_26 = BE offset.
DR, model_<i>_kind=3
- field_113 = structure type; 1=type-1, 2=type-2.
- field_114 = structure break mode; 1=body, 2=wick.
- field_115 = structure dir count; type-1: 1..3, type-2: packed like 11, 12, 23.
- field_81 = SL model type; 1=Fractal, 2=Intermediate, 3=LongTerm.
- field_82 = SL fractal mode; 3 or 5.
- field_33 = max positions.
- field_34 = entry level.
- field_32 = SL coef.
- field_83 = structure direction check; 0/1.
- field_35 = BE trigger.
- field_36 = BE offset.
SMR, model_<i>_kind=4
- field_116 = structure type; 1=type-1, 2=type-2.
- field_117 = structure break mode; 1=body, 2=wick.
- field_118 = structure dir count.
- field_84 = SL model type; 1=Fractal, 2=Intermediate, 3=LongTerm.
- field_85 = SL fractal mode; 3 or 5.
- field_42 = PD entry.
- field_43 = SL.
- field_44 = max positions.
- field_45 = BE trigger.
- field_46 = BE offset.
MS, model_<i>_kind=5
- field_57 = structure/SL model type; 1=Fractal, 2=Intermediate, 3=LongTerm.
- field_58 = structure/SL fractal mode; 3 or 5.
- field_52 = PD entry.
- field_59 = SL.
- field_53 = FVG only; 0/1.
- field_54 = max positions.
- field_55 = BE trigger.
- field_56 = BE offset.
MA, model_<i>_kind=6
- field_60 = fast period; example 25.
- field_61 = slow period; example 55.
- field_62 = MA method; 0=SMA, 1=EMA, 2=SMMA, 3=LWMA.
- field_63 = applied price; 1=Close, 2=Open, 3=High, 4=Low, 5=Median, 6=Typical, 7=Weighted.
- field_80 = entry above slow only; 0/1.
- field_78 = SL model type; 1=Fractal, 2=Intermediate, 3=LongTerm.
- field_79 = SL fractal mode; 3 or 5.
- field_67 = max positions.
- field_68 = BE trigger.
- field_69 = BE offset.
BPR, model_<i>_kind=7
- field_91 = max fractals between FVGs; example 3.
- field_92 = impulse fib; example 0.50.
- field_93 = entry mode; 1=aggressive, 2=half, 3=full fill.
- field_94 = SL mode; 1=candle, 2=fractal 3, 3=full fill .1.
- field_95 = max positions.
- field_96 = BE trigger.
- field_97 = BE offset.
Plan Section
- plan_version = plan-section version; example 1.
- plan_label = plan name; example q.
- plan_enabled = plan enabled; 0/1.
- risk_mode = 0=percent, 1=dollar, 2=lots, 3=equity/lots mode.
- risk_value = risk value; example 1.000000.
- risk_value_base = base/cache risk value; usually can be kept equal to risk_value.
- logic_mode = 0=long, 1=short, 2=box.
- direction_mode = -1=none, 0=longs, 1=shorts, 2=box, 3=MA, 4=Swing.
- entry = plan entry price; written as 0 if cond_start=0.
- stop = plan SL price; written as 0 if cond_sl=0.
- take = plan TP price; written as 0 if cond_tp=0.
Direction MA and Swing
- direction_ma_tf = Direction MA timeframe.
- direction_ma_fast = Direction MA fast period.
- direction_ma_slow = Direction MA slow period.
- direction_ma_method = Direction MA method; 0=SMA, 1=EMA, 2=SMMA, 3=LWMA.
- direction_ma_price = Direction MA price; 1=Close etc.
- direction_ma_longs = allow longs by Direction MA; 0/1.
- direction_ma_shorts = allow shorts by Direction MA; 0/1.
- direction_ma_distance_on = MA distance filter enabled; 0/1.
- direction_ma_distance_points = MA distance points.
- direction_ma_distance_auto = auto distance; 0/1.
- direction_ma_show = show Direction MA visual; 0/1.
- direction_box_show = show Direction Box visual; 0/1.
- direction_swing_tf1_on = Swing TF1 enabled; 0/1.
- direction_swing_tf1 = Swing TF1 timeframe.
- direction_swing_tf2_on = Swing TF2 enabled; 0/1.
- direction_swing_tf2 = Swing TF2 timeframe.
- direction_swing_tf3_on = Swing TF3 enabled; 0/1.
- direction_swing_tf3 = Swing TF3 timeframe.
- direction_swing_type = Swing fractal type; 1=Fractal/ST, 2=IT, 3=LT.
- direction_swing_mode = Swing fractal mode; 3 or 5.
- direction_swing_structure_type = 1=type-1, 2=type-2.
- direction_swing_break_mode = 1=body, 2=wick.
- direction_swing_dir_count = direction count; 1..3 or packed type-2 value.
- direction_swing_show = show Swing visual; 0/1.
- direction_swing_tf1_show = show TF1 overlay; 0/1.
- direction_swing_tf2_show = show TF2 overlay; 0/1.
- direction_swing_tf3_show = show TF3 overlay; 0/1.
Start-After Keys
- cond_start = Start After Entry enabled; 0/1.
- cond_struct = Start Swing/Structure gate enabled; 0/1.
- start_struct_long = start structure direction long flag; 0/1.
- cond_pd = Premium/Discount gate enabled; 0/1.
- cond_imbalance = Imbalance gate enabled; 0/1.
- cond_ma = Start MA gate enabled; 0/1.
- cond_start_time = Start time gate enabled; 0/1.
- cond_time = duplicate/legacy start time gate; keep same as cond_start_time.
- start_struct_tf = Structure TF.
- start_struct_type = 1=Fractal/ST, 2=IT, 3=LT.
- start_struct_mode = 3 or 5.
- start_struct_structure_type = 1=type-1, 2=type-2.
- start_struct_break_mode = 1=body, 2=wick.
- start_struct_dir_count = dir count.
- start_pd_tf = Premium/Discount TF.
- start_imbalance_tf = Imbalance TF.
- start_imbalance_rearm_tf = Imbalance rearm TF.
- start_imbalance_rearm_type = rearm fractal type.
- start_imbalance_rearm_mode = rearm fractal mode.
- start_imbalance_rearm_structure_type = 1=type-1, 2=type-2.
- start_imbalance_rearm_break_mode = 1=body, 2=wick.
- start_imbalance_rearm_dir_count = dir count.
- start_imbalance_rearm_pd_only = rearm only through PD; 0/1.
- start_prev_day_high = previous day high gate; 0/1.
- start_prev_day_high_time_cfg = use time cfg for this gate; 0/1.
- start_prev_day_low = previous day low gate; 0/1.
- start_prev_day_low_time_cfg = use time cfg; 0/1.
- start_prev_week_high = previous week high gate; 0/1.
- start_prev_week_high_time_cfg = use time cfg; 0/1.
- start_prev_week_low = previous week low gate; 0/1.
- start_prev_week_low_time_cfg = use time cfg; 0/1.
- start_prev_weekday_level = previous weekday high/low gate; 0/1.
- start_prev_weekday_level_time_cfg = use time cfg; 0/1.
- start_prev_weekday_day = weekday 1..5, Mon..Fri.
- start_prev_weekday_high = 1=high, 0=low.
- start_prev_levels_one_of = previous-level gates use OR instead of all; 0/1.
- start_ma_tf = Start MA TF.
- start_ma_fast = Start MA fast.
- start_ma_slow = Start MA slow.
- start_ma_method = 0=SMA, 1=EMA, 2=SMMA, 3=LWMA.
- start_ma_price = applied price.
- start_ma_longs = allow longs; 0/1.
- start_ma_shorts = allow shorts; 0/1.
- start_ma_distance_on = distance filter enabled; 0/1.
- start_ma_distance_points = distance points.
- start_ma_distance_auto = auto distance; 0/1.
- start_vis_show = show Start canvas visuals; 0/1.
- start_time_h = start time hour.
- start_time_m = start time minute.
End-At Keys
- cond_tp = End at TP enabled; 0/1.
- cond_sl = End at SL enabled; 0/1.
- cond_max = End at max loss enabled; 0/1.
- cond_end_time = End at time enabled; 0/1.
- end_time_h = end time hour.
- end_time_m = end time minute.
- end_prev_day_high = end/rearm by previous day high; 0/1.
- end_prev_day_high_time_cfg = use time cfg; 0/1.
- end_prev_day_low = previous day low; 0/1.
- end_prev_day_low_time_cfg = use time cfg; 0/1.
- end_prev_week_high = previous week high; 0/1.
- end_prev_week_high_time_cfg = use time cfg; 0/1.
- end_prev_week_low = previous week low; 0/1.
- end_prev_week_low_time_cfg = use time cfg; 0/1.
- end_prev_scope = 0=all, 1=longs, 2=shorts.
- end_prev_rearm_loss = rearm after loss; 0/1.
- end_prev_rearm_tp = rearm after TP; 0/1.
- end_prev_rearm_tp_kind = level kind: 0=none, 1=PDH, 2=PDL, 3=PWH, 4=PWL.
- end_prev_rearm_tp_time_cfg = use time cfg; 0/1.
- end_prev_rearm_sl = rearm after SL; 0/1.
- end_prev_rearm_sl_kind = level kind.
- end_prev_rearm_sl_time_cfg = use time cfg; 0/1.
- end_vis_show = show End visuals; 0/1.
- time_vis_show = show Time visuals; 0/1.
Linked CFG and UI Visibility
- models_cfg_name = linked models cfg name; blank for single-file plan.
- start_cfg_name = linked start cfg name; blank for single-file plan.
- end_cfg_name = linked end cfg name; blank for single-file plan.
- box_cfg_name = linked box cfg name; blank for single-file plan.
- time_cfg_name = linked time cfg name; blank for single-file plan.
- ma_cfg_name = linked Direction MA cfg name; blank for single-file plan.
- swing_cfg_name = linked Direction Swing cfg name; blank for single-file plan.
- show_start_after = UI section expanded/visible; 0/1.
- show_end_at = UI section expanded/visible; 0/1.
- show_box = UI section expanded/visible; 0/1.
- show_time = UI section expanded/visible; 0/1.
- show_models = UI section expanded/visible; 0/1.
Box and Time Rows
- box_count = number of box rows.
- box_active = active box row index.
- box_<i>_show = show box row visual; 0/1.
- box_<i>_from_h = from hour.
- box_<i>_from_m = from minute.
- box_<i>_to_h = to hour.
- box_<i>_to_m = to minute.
- box_<i>_confirm_tf = confirm TF.
- box_<i>_confirm_mode = 1=body, 2=wick.
- box_<i>_flip = flip on break; 0/1.
- box_<i>_session_mode = session mode; 0/1.
- box_<i>_life_on = lifetime enabled; 0/1.
- box_<i>_life_min = lifetime minutes.
- time_count = number of time rows.
- time_active = active time row index.
- time_<i>_start_on = start bound enabled; 0/1.
- time_<i>_start_h = start hour.
- time_<i>_start_m = start minute.
- time_<i>_end_on = end bound enabled; 0/1.
- time_<i>_end_h = end hour.
- time_<i>_end_m = end minute.
- daily_close_on = daily close enabled; 0/1.
- daily_close_h = daily close hour.
- daily_close_m = daily close minute.
- friday_close_on = friday close enabled; 0/1.
- friday_close_h = friday close hour.
- friday_close_m = friday close minute.
- weekday_mon_on = Monday enabled; 0/1.
- weekday_tue_on = Tuesday enabled; 0/1.
- weekday_wed_on = Wednesday enabled; 0/1.
- weekday_thu_on = Thursday enabled; 0/1.
- weekday_fri_on = Friday enabled; 0/1.
- weekday_sat_on = Saturday enabled; 0/1.
- weekday_sun_on = Sunday enabled; 0/1.
Model Stats
- model_stat_count = runtime stats rows. For tester preset files, it is better to set this to 0.
- model_stat_<i>_kind = model kind.
- model_stat_<i>_idx = model index.
- model_stat_<i>_magic = magic.
- model_stat_<i>_spent_open = open spent risk.
- model_stat_<i>_spent_total = total spent risk.
- model_stat_<i>_realized = realized total.
- model_stat_<i>_opens = opens count.
- model_stat_<i>_closes = closes count.
- model_stat_<i>_realized_profit = realized profit.
- model_stat_<i>_realized_loss = realized loss.
- model_stat_<i>_win_events = win events.
- model_stat_<i>_loss_events = loss events.
Minimal MA plan for a single-file tester workflow
pack_version=1
pack_label=ma_test
history_depth=120
model_total=1
model_0_kind=6
model_0_show=0
model_0_on=1
model_0_tf=5
model_0_cfg_name=
model_0_basic_cfg_name=
model_0_field_74=0.1000
model_0_field_60=25.0000
model_0_field_61=55.0000
model_0_field_62=1.0000
model_0_field_63=1.0000
model_0_field_89=2.0000
model_0_field_99=1.0000
model_0_field_100=2.0000
schema_first_count=0
schema_then_count=0
plan_version=1
plan_label=ma_test
plan_enabled=1
risk_mode=0
risk_value=1.000000
risk_value_base=1.000000
logic_mode=0
direction_mode=3
direction_ma_tf=5
direction_ma_fast=20
direction_ma_slow=50
direction_ma_method=1
direction_ma_price=1
direction_ma_longs=1
direction_ma_shorts=1
models_cfg_name=
start_cfg_name=
end_cfg_name=
box_cfg_name=
time_cfg_name=
ma_cfg_name=
swing_cfg_name=
model_stat_count=0Admin presets are separate from plan_cfg
Admin presets are stored separately from regular plan_cfg files. They are not plan-x.cfg and they are not regular UI presets; they are input slot files for the admin optimization module.
This layer is for batch optimization through admin inputs. If clients need a simple file-based workflow, give them ZEN\plan_cfg\plan-x.cfg instead.
Where admin presets live
MQL5\Files\ZEN\admin_presets\<slug>.cfg
TERMINAL_COMMONDATA_PATH\Files\ZEN\admin_presets\<slug>.cfgHow the admin optimization module is enabled
The admin optimization module is enabled with InpAdminTesterOptModuleEnabled = true.
The regular tester workflow uses InpDefaultPlanCfgFile=<name> and loads plan_cfg\plan-<name>.cfg.
Regular tester workflow
InpDefaultPlanCfgFile=<name>
ZEN\plan_cfg\plan-<name>.cfgAdmin workflow through inputs
InpAdminTesterOptModuleEnabled=true
InpAdminOptBfConfig=...
InpAdminOptTimeConfig=...
InpAdminOptDirectionMode=...
...In the admin workflow, Lazy Trader takes compiled defaults plus overrides from ZEN\admin_presets\*.cfg files. The loader checks local first, then common Files.
Admin preset files
ZEN\admin_presets\bf.cfg
ZEN\admin_presets\lw.cfg
ZEN\admin_presets\cs1.cfg
ZEN\admin_presets\cs2.cfg
ZEN\admin_presets\csr.cfg
ZEN\admin_presets\bpr.cfg
ZEN\admin_presets\ma.cfg
ZEN\admin_presets\basic.cfg
ZEN\admin_presets\time.cfg
ZEN\admin_presets\start_swing.cfg
ZEN\admin_presets\start_fvg.cfg
ZEN\admin_presets\start_ma.cfg
ZEN\admin_presets\direction_swing.cfg
ZEN\admin_presets\direction_ma.cfg
ZEN\admin_presets\direction_box.cfg
ZEN\admin_presets\structure.cfgSlot-based format
version=1
slot.0.label=BF_1
slot.0.cfg_suffix=...
slot.0.tf=5
slot.0.model_type=1
slot.0.fractal_mode=3
...Admin-generated plan export
InpAdminOptSaveAsPlan=true
MQL5\Files\ZEN\AdminCfg\plan-<symbol>-<timestamp>.cfgShort file map
ZEN\plan_cfg\plan-x.cfg = regular self-contained plan for InpDefaultPlanCfgFile.
ZEN\admin_presets\*.cfg = admin slot-presets for the optimization module.
ZEN\AdminCfg\plan-*.cfg = exported admin-generated plan result when SaveAsPlan is enabled.For native Strategy Tester optimization, the external-generator workflow should stay slot-based: the generator writes admin_presets ahead of time, and the MT5 optimizer iterates existing enum/input values.
External generator: overall flow
external generator
-> writes ZEN\admin_presets\*.cfg
-> MT5 optimizer iterates enum/input parameters
-> Lazy Trader builds a runtime plan from selected slots on OnInit
-> tester calculates the passTester inputs to enable
InpDefaultPlanCfgFile=
InpAdminTesterOptModuleEnabled=true
InpAdminOptSaveAsPlan=false or trueDo not mix loaders
InpDefaultPlanCfgFile should be left empty so the regular plan-loader is not mixed with the admin optimizer.
What to optimize in the admin module
InpAdminOptBfConfig
InpAdminOptLwConfig
InpAdminOptClassicStructure1Config
InpAdminOptClassicStructure2Config
InpAdminOptClassicReversalConfig
InpAdminOptBprConfig
InpAdminOptMaConfig
InpAdminOptBaseConfig
InpAdminOptTimeConfig
InpAdminOptDirectionMode
InpAdminOptDirectionMa
InpAdminOptDirectionSwing
InpAdminOptDirectionBox
InpAdminOptBfOn
InpAdminOptLwOn
InpAdminOptClassicStructure1On
InpAdminOptClassicStructure2On
InpAdminOptClassicReversalOn
InpAdminOptBprOn
InpAdminOptMaOnThe external generator should write the full file set to local Files and preferably to Common Files at the same time. The current loader reads local first and then FILE_COMMON, so stale local files must not be left behind because they will override common files.
Where the external generator writes
<MQL5 data>\Files\ZEN\admin_presets\*.cfg
<TERMINAL_COMMONDATA_PATH>\Files\ZEN\admin_presets\*.cfgTypical generator files
ZEN\admin_presets\ma.cfg
ZEN\admin_presets\basic.cfg
ZEN\admin_presets\time.cfg
ZEN\admin_presets\bf.cfg
ZEN\admin_presets\lw.cfg
ZEN\admin_presets\bpr.cfg
ZEN\admin_presets\direction_ma.cfg
ZEN\admin_presets\direction_swing.cfg
ZEN\admin_presets\direction_box.cfg
ZEN\admin_presets\structure.cfgma.cfg example
version=1
slot.0.cfg_suffix=gen_ma_001
slot.0.tf=5
slot.0.fast_period=20
slot.0.slow_period=50
slot.0.method=1
slot.0.price=1
slot.0.sl_model_type=2
slot.0.sl_fractal_mode=3
slot.1.cfg_suffix=gen_ma_002
slot.1.tf=5
slot.1.fast_period=30
slot.1.slow_period=80
slot.1.method=1
slot.1.price=1
slot.1.sl_model_type=2
slot.1.sl_fractal_mode=3basic.cfg example
version=1
slot.0.cfg_suffix=gen_basic_001
slot.0.max_positions=1
slot.0.once_on=0
slot.0.max_pos_ignore_be_on=1
slot.0.spread_to_sl=2
slot.0.max_spread_on=0
slot.0.max_spread_pts=0
slot.0.max_spread_auto_on=1
slot.0.max_spread_auto_mult=0.5
slot.0.min_sl_pts=0
slot.0.max_sl_pts=0
slot.0.min_sl_auto_on=0
slot.0.min_sl_auto_mult=1.0
slot.0.max_sl_auto_on=0
slot.0.max_sl_auto_mult=3.0
slot.0.min_sl_fractal_on=1
slot.0.max_freq_on=1
slot.0.max_freq_minutes=45
slot.0.min_rr_on=1
slot.0.min_rr=2.0
slot.0.be_enabled=1
slot.0.be_trigger=0.8
slot.0.be_offset=0.1
slot.0.tp1_plan_tp=0
slot.0.tp_count=3
slot.0.tp_rr_1=1.0
slot.0.tp_rr_2=2.0
slot.0.tp_rr_3=3.0time.cfg example
version=1
slot.0.cfg_name=gen_time_001
slot.0.block_1_on=1
slot.0.block_1_start_h=8
slot.0.block_1_start_m=0
slot.0.block_1_end_h=12
slot.0.block_1_end_m=0
slot.0.block_2_on=1
slot.0.block_2_start_h=13
slot.0.block_2_start_m=0
slot.0.block_2_end_h=17
slot.0.block_2_end_m=0Critical external-generator constraints
- Do not rewrite admin_presets\*.cfg while an optimization run is already running. Passes can run in parallel, and different agents can read the file at different times.
- The number of variants is limited by existing enum slots. If the code has MA_1..MA_5, the generator can fill 5 MA slots and MT5 can optimize selection between those 5 enum values.
- Adding slot.99 to a file is not enough if there is no input enum value that points to it.
- If the generator changes file contents while the input-parameter set stays the same, MT5 can use the optimization cache. That is dangerous because the result can come from an older file version.
- Cache options: clear the optimization cache before a new batch, change some input batch/version id, add input int InpAdminPresetBatchId, or add #property tester_no_cache in the main mq5 if disabling EA-level cache is acceptable.
- For remote/cloud agents the file story is more fragile. Officially tester agents are isolated and file operations go through the agent sandbox; FILE_COMMON helps local agents and the terminal communicate through a shared folder.
- Validate cloud/remote workflows separately first, because dynamically generated external files are not the same thing as a static #property tester_file.
Recommended generator architecture
- The generator creates a run_id, for example 20260601_001.
- The generator writes the complete admin_presets/*.cfg set into local Files and Common Files.
- The generator does not touch these files until the optimization run ends.
- MT5 optimization starts with InpAdminTesterOptModuleEnabled=true and an empty InpDefaultPlanCfgFile=.
- The optimizer iterates enum slots.
- Lazy Trader builds a runtime plan from the selected slots on every pass.
- Results are taken from MT5 Optimization Results.
- If audit/debug output is needed, enable InpAdminOptSaveAsPlan=true, then generated plans are saved to ZEN\AdminCfg\plan-<symbol>-<timestamp>.cfg.
If thousands of complete configs are needed
If the target is not a slot matrix but thousands of arbitrary complete configurations, add a separate adapter. Without that adapter, the current admin system is suitable for a fixed number of enum slots.
Adapter for generated presets
input int InpAdminGeneratedPresetId = 0;
input int InpAdminPresetBatchId = 0;
ZEN\admin_presets\generated\<batch_id>\<preset_id>.cfgOther Lazy Trader sections
Balanced Price Range (BPR)
BPR is the imbalance-compression model: it works with the overlap between opposite inefficiencies and lets you choose how deep into that balance zone entry should happen.
Moving Averages model
The MA model does more than “touch the fast average”: it also validates the nearest eligible fractal to the left before opening.
Classic Structure Reversal
Classic Reversal becomes relevant only when structure itself turns; it is not just a pullback model with a different stop.
Classic Structure via primary liquidity sweep
This variation opens on the first important structural violation and reads it as a sweep rather than as a full structural reversal.
Classic Structure Trend
Classic Trend participates on a pullback inside the active structure without requiring the structure direction itself to flip.
Classic Structure family
Classic Structure is the shared logic layer for three related pages: trend continuation, primary liquidity sweep, and reversal structure.
Larry-Williams model
Larry-Williams works with range extremes and supports both direct breakout continuation and return-entry logic after a raid back into the range.
Box-Fractal model
Box-Fractal uses a confirmed fractal range as the structural base for entry and stop placement rather than entering at the first raw extremum.
Position Manager
Position Manager gives each open trade its own chart-level button and lets you adjust takes, breakeven, stop-loss, and level sizing without leaving the Lazy Trader workflow.
STATUS canvas
Status canvas merges Direction, Start After, End At, Time, and Models into one live state map, so you can see what is aligned, what is still pending, and why the plan is running or waiting.
START AFTER menu
Start After does not pick the side of the trade; it defines what must happen before the plan is allowed to begin evaluating entries at all.
DIRECTION menu
Direction defines whether the plan is fixed long-only, fixed short-only, or dynamically biased through box, MA, or swing logic.
Automatic direction detection
This section explains the combined logic of Direction plus Start After, which is where many users actually shape the market bias of the plan.
TIME menu
TIME is where session logic lives: windows, overnights, weekday permissions, daily close, Friday close, and broker-specific timing constraints.
END AT menu
END AT defines when the plan stops looking for new positions, which is different from instantly flattening every already-open trade.
What Lazy Trader does
Use this page when the main question is not “which button do I press”, but “what role does Lazy Trader play in the workflow at all”.