File size: 43,009 Bytes
ee7b200
53bff35
86d1191
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
b21c07d
 
 
 
 
 
 
86d1191
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
b21c07d
 
86d1191
 
53bff35
 
86d1191
 
53bff35
86d1191
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
309ecaf
86d1191
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
b21c07d
 
 
86d1191
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
b21c07d
86d1191
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
b21c07d
 
86d1191
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
b21c07d
86d1191
b21c07d
 
86d1191
 
b21c07d
86d1191
 
b21c07d
 
 
 
 
 
 
86d1191
 
b21c07d
 
86d1191
 
b21c07d
 
86d1191
 
b21c07d
 
86d1191
 
 
 
b21c07d
 
 
 
 
 
 
86d1191
 
b21c07d
 
86d1191
 
b21c07d
 
86d1191
 
b21c07d
 
86d1191
 
 
 
b21c07d
 
 
 
 
 
 
86d1191
 
b21c07d
 
86d1191
 
b21c07d
 
86d1191
 
b21c07d
 
86d1191
 
 
 
b21c07d
 
86d1191
b21c07d
86d1191
b21c07d
86d1191
 
b21c07d
 
86d1191
 
b21c07d
 
86d1191
 
b21c07d
 
86d1191
 
b21c07d
 
 
 
 
 
 
 
 
 
 
 
 
 
86d1191
 
b21c07d
 
 
 
 
 
 
 
 
 
 
 
86d1191
 
b21c07d
 
86d1191
 
b21c07d
 
86d1191
 
b21c07d
 
 
86d1191
 
 
b21c07d
 
86d1191
b21c07d
 
 
 
86d1191
 
b21c07d
 
86d1191
 
b21c07d
 
86d1191
 
b21c07d
 
86d1191
 
 
 
b21c07d
 
86d1191
b21c07d
 
 
86d1191
 
b21c07d
 
86d1191
 
b21c07d
 
86d1191
 
b21c07d
 
86d1191
 
b21c07d
86d1191
b21c07d
 
 
 
 
 
86d1191
 
b21c07d
 
86d1191
 
b21c07d
 
86d1191
 
b21c07d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
86d1191
 
 
 
b21c07d
 
86d1191
b21c07d
 
 
86d1191
 
b21c07d
 
86d1191
 
b21c07d
 
86d1191
 
b21c07d
 
86d1191
 
 
 
b21c07d
 
 
 
 
 
86d1191
 
b21c07d
 
86d1191
 
b21c07d
 
86d1191
 
b21c07d
 
86d1191
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
b21c07d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
86d1191
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
b21c07d
 
 
86d1191
 
b21c07d
 
86d1191
 
b21c07d
86d1191
 
b21c07d
 
86d1191
b21c07d
 
86d1191
 
b21c07d
 
86d1191
 
b21c07d
86d1191
 
b21c07d
 
86d1191
b21c07d
 
 
86d1191
 
b21c07d
 
86d1191
b21c07d
 
 
86d1191
 
b21c07d
 
86d1191
b21c07d
 
 
86d1191
 
b21c07d
 
 
 
 
 
86d1191
 
 
 
 
b21c07d
 
86d1191
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
b21c07d
86d1191
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
b21c07d
86d1191
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
ee7b200
86d1191
 
 
19c5a09
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
{
 "version": "8.0",
 "sections": [
  {
   "id": "telegram",
   "title": "Telegram & Alerts",
   "summary": "Connect your private Telegram bot and control how and when alerts are delivered.",
   "fields": [
    {
     "key": "TELEGRAM_BOT_TOKEN",
     "label": "Telegram Bot Token",
     "type": "secret",
     "default": "",
     "help": "The token from @BotFather, e.g. 123456:ABC-DEF... Stored on your private disk. Required for any Telegram delivery."
    },
    {
     "key": "TELEGRAM_CHAT_ID",
     "label": "Telegram Chat I.D",
     "type": "secret",
     "default": "",
     "help": "The numeric chat the bot sends to. Message your bot, then read it from the bot getUpdates endpoint. Can be your user id or a group id (often negative)."
    },
    {
     "key": "TELEGRAM_API_BASE",
     "label": "Telegram API Base URL",
     "type": "text",
     "default": "https://api.telegram.org",
     "help": "Hugging Face blocks direct traffic to api.telegram.org, so alerts silently fail. Paste the URL of your free reverse proxy here (e.g. https://your-worker.deno.dev) and all alerts route through it. Leave as the default only if your host can reach Telegram directly. No trailing slash. See the Telegram setup guide for the 5-minute Deno worker."
    },
    {
     "key": "BROWSER_ALERT_SOUND",
     "label": "Browser Alert Sound",
     "type": "toggle",
     "default": true,
     "help": "Play a short notification chime in the browser whenever any alert fires. The sound is cached to the persistent disk."
    },
    {
     "key": "ALERT_COOLDOWN_SECONDS",
     "label": "Alert Cooldown",
     "type": "int",
     "unit": "seconds",
     "default": 900,
     "help": "Minimum gap between repeat alerts for the same pair and stage, to avoid spam.",
     "presets": [
      {
       "label": "5 minutes",
       "value": 300
      },
      {
       "label": "15 minutes (default)",
       "value": 900
      },
      {
       "label": "30 minutes",
       "value": 1800
      },
      {
       "label": "1 hour",
       "value": 3600
      }
     ]
    },
    {
     "key": "ALERT_ON_EXIT",
     "label": "Telegram Exit Alert",
     "type": "toggle",
     "default": true,
     "help": "Send one Telegram message when a live trade's verdict reaches “Setup Broken — Exit Now” or “Reversal Confirmed — Close The Trade”. Latched so it never spams. The SL/TP/Break-even lifecycle still closes trades — this is advisory."
    },
    {
     "key": "WEEKLY_ALERT_ENABLED",
     "label": "Weekly Summary",
     "type": "toggle",
     "default": true,
     "help": "Send a once-a-week performance digest to Telegram (top Stage 5 symbols, cycles, invalidations)."
    },
    {
     "key": "WEEKLY_ALERT_WEEKDAY_UTC",
     "label": "Weekly Summary Day",
     "type": "select",
     "default": 0,
     "help": "Day of week (UTC) the weekly summary is sent.",
     "presets": [
      {
       "label": "Monday",
       "value": 0
      },
      {
       "label": "Tuesday",
       "value": 1
      },
      {
       "label": "Wednesday",
       "value": 2
      },
      {
       "label": "Thursday",
       "value": 3
      },
      {
       "label": "Friday",
       "value": 4
      },
      {
       "label": "Saturday",
       "value": 5
      },
      {
       "label": "Sunday",
       "value": 6
      }
     ]
    },
    {
     "key": "WEEKLY_ALERT_HOUR_UTC",
     "label": "Weekly Summary Hour",
     "type": "int",
     "unit": "hour (UTC)",
     "default": 8,
     "help": "Hour of day (0-23, UTC) for the weekly summary.",
     "presets": [
      {
       "label": "00:00 UTC",
       "value": 0
      },
      {
       "label": "08:00 UTC (default)",
       "value": 8
      },
      {
       "label": "12:00 UTC",
       "value": 12
      },
      {
       "label": "20:00 UTC",
       "value": 20
      }
     ]
    }
   ]
  },
  {
   "id": "scanner",
   "title": "Scanner Engine & Universe",
   "summary": "Master switch for the market scanner plus how the symbol universe is sized and filtered.",
   "fields": [
    {
     "key": "SCANNER_ENABLED",
     "label": "Scanner Engine",
     "type": "toggle",
     "default": true,
     "help": "Master switch for the market scanner. When ON, the engine rotates through the symbol universe each cycle detecting setups. OFF pauses all scanning. On by default."
    },
    {
     "key": "SCAN_INTERVAL_SECONDS",
     "label": "Scan Interval",
     "type": "int",
     "unit": "seconds",
     "default": 30,
     "help": "Pause between full scan cycles. Lower = fresher data, more bandwidth.",
     "presets": [
      {
       "label": "15 seconds (fast)",
       "value": 15
      },
      {
       "label": "30 seconds (default)",
       "value": 30
      },
      {
       "label": "60 seconds (gentle)",
       "value": 60
      }
     ]
    },
    {
     "key": "SYMBOL_REFRESH_MINUTES",
     "label": "Universe Refresh",
     "type": "int",
     "unit": "minutes",
     "default": 60,
     "help": "How often the tradable-symbol list and 24h turnover ranking are rebuilt.",
     "presets": [
      {
       "label": "30 minutes",
       "value": 30
      },
      {
       "label": "60 minutes (default)",
       "value": 60
      },
      {
       "label": "120 minutes",
       "value": 120
      }
     ]
    },
    {
     "key": "SCAN_SHARDS",
     "label": "Scan Shards",
     "type": "int",
     "unit": "shards",
     "default": 8,
     "help": "The universe is split into this many shards; one shard is swept per cycle (active-stage pairs are always re-checked).",
     "presets": [
      {
       "label": "4 (heavier cycles)",
       "value": 4
      },
      {
       "label": "8 (default)",
       "value": 8
      },
      {
       "label": "16 (lighter cycles)",
       "value": 16
      }
     ]
    },
    {
     "key": "REQUEST_TIMEOUT_SECONDS",
     "label": "Request Timeout",
     "type": "int",
     "unit": "seconds",
     "default": 12,
     "help": "Network timeout per exchange/Telegram request.",
     "presets": [
      {
       "label": "8 seconds",
       "value": 8
      },
      {
       "label": "12 seconds (default)",
       "value": 12
      },
      {
       "label": "20 seconds",
       "value": 20
      }
     ]
    },
    {
     "key": "REQUEST_CONCURRENCY",
     "label": "Request Concurrency",
     "type": "int",
     "unit": "parallel",
     "default": 20,
     "help": "How many exchange requests run in parallel. Higher = faster scans but more load.",
     "presets": [
      {
       "label": "10 (gentle)",
       "value": 10
      },
      {
       "label": "20 (default)",
       "value": 20
      },
      {
       "label": "40 (aggressive)",
       "value": 40
      }
     ]
    },
    {
     "key": "MAX_BARS_PER_SYMBOL",
     "label": "Candles Per Symbol",
     "type": "int",
     "unit": "candles",
     "default": 500,
     "help": "Size of the rolling 15m window loaded per pair. Larger keeps long-lived Stage 3/4 anchors visible on charts.",
     "presets": [
      {
       "label": "300 (~3 days)",
       "value": 300
      },
      {
       "label": "500 (~5 days, default)",
       "value": 500
      },
      {
       "label": "750 (~8 days)",
       "value": 750
      }
     ]
    },
    {
     "key": "UNIVERSE_TOP_N",
     "label": "Top Pairs By Turnover",
     "type": "int",
     "unit": "pairs",
     "default": 0,
     "help": "Keep only the N highest-turnover perps so majors lead the scan. 0 = scan every eligible pair.",
     "presets": [
      {
       "label": "All pairs (default)",
       "value": 0
      },
      {
       "label": "Top 100",
       "value": 100
      },
      {
       "label": "Top 200",
       "value": 200
      },
      {
       "label": "Top 400",
       "value": 400
      }
     ]
    },
    {
     "key": "UNIVERSE_MIN_TURNOVER",
     "label": "Minimum 24h Turnover",
     "type": "float",
     "unit": "USDT",
     "default": 0,
     "help": "Drop any pair whose 24h quote turnover is below this. 0 = no minimum.",
     "presets": [
      {
       "label": "No minimum (default)",
       "value": 0
      },
      {
       "label": "1M USDT",
       "value": 1000000
      },
      {
       "label": "10M USDT",
       "value": 10000000
      }
     ]
    },
    {
     "key": "MEXC_MAX_FUTURES_SYMBOLS",
     "label": "Hard Symbol Cap",
     "type": "int",
     "unit": "pairs",
     "default": 0,
     "help": "Absolute cap on the scan list after ranking. 0 = no cap.",
     "presets": [
      {
       "label": "No cap (default)",
       "value": 0
      },
      {
       "label": "150",
       "value": 150
      },
      {
       "label": "300",
       "value": 300
      }
     ]
    },
    {
     "key": "UNIVERSE_EXCLUDE_CONTAINS",
     "label": "Exclude Names Containing",
     "type": "text",
     "default": "STOCK",
     "help": "Comma-separated substrings; any symbol containing one is excluded (catches the whole tokenized-equity family in one rule)."
    },
    {
     "key": "REQUIRE_API_TRADABLE",
     "label": "Futures-Tradable Only",
     "type": "toggle",
     "default": true,
     "help": "Only scan pairs MEXC marks as API/futures-tradable. Off includes spot-only contracts that show under futures but cannot be traded."
    },
    {
     "key": "EXCLUDE_TOKENIZED_STOCKS",
     "label": "Exclude Tokenized Stocks/Commodities",
     "type": "toggle",
     "default": true,
     "help": "Drop tokenized equities & commodities (gold, *STOCK, SOXL...) by exchange type flag — more robust than the name-substring rule. Off includes them."
    }
   ]
  },
  {
   "id": "detection",
   "title": "Strategy · Detection (Impulse, FVG & Timing)",
   "summary": "Stage 0-3 SMC detection: impulse + FVG quality, retracement, and zone TTL / staleness.",
   "fields": [
    {
     "key": "MIN_IMPULSE_BODY_MULT",
     "label": "Min Impulse Body Strength",
     "type": "float",
     "unit": "x ATR",
     "default": 1.45,
     "help": "Minimum body size (vs ATR) for a candle to count toward an impulse. Higher = only stronger displacement qualifies.",
     "presets": [
      {
       "label": "1.20 (loose)",
       "value": 1.2
      },
      {
       "label": "1.45 (default)",
       "value": 1.45
      },
      {
       "label": "1.80 (strict)",
       "value": 1.8
      }
     ]
    },
    {
     "key": "MIN_IMPULSE_RANGE_MULT",
     "label": "Min Impulse Range Strength",
     "type": "float",
     "unit": "x ATR",
     "default": 1.95,
     "help": "Minimum total range (vs ATR) of the impulse leg.",
     "presets": [
      {
       "label": "1.60 (loose)",
       "value": 1.6
      },
      {
       "label": "1.95 (default)",
       "value": 1.95
      },
      {
       "label": "2.40 (strict)",
       "value": 2.4
      }
     ]
    },
    {
     "key": "MIN_IMPULSE_CANDLES",
     "label": "Min Impulse Candles",
     "type": "int",
     "unit": "candles",
     "default": 3,
     "help": "Fewest consecutive same-direction candles that form a valid impulse.",
     "presets": [
      {
       "label": "2",
       "value": 2
      },
      {
       "label": "3 (default)",
       "value": 3
      },
      {
       "label": "4",
       "value": 4
      }
     ]
    },
    {
     "key": "FVG_PRISTINE_STRICT",
     "label": "Strict Pristine FVG",
     "type": "toggle",
     "default": true,
     "help": "Require the fair-value gap to stay completely untouched until the Stage 2 sweep completes. Off relaxes the rule and lets more (lower-quality) setups through."
    },
    {
     "key": "MIN_STAGE1_INDUCEMENTS",
     "label": "Min Stage 1 Inducements",
     "type": "int",
     "unit": "pools",
     "default": 2,
     "help": "Minimum liquidity pools that must exist for Stage 1 to lock.",
     "presets": [
      {
       "label": "2 (default)",
       "value": 2
      },
      {
       "label": "3",
       "value": 3
      }
     ]
    },
    {
     "key": "MAX_CANDIDATE_ZONES",
     "label": "Candidate Zones Scanned",
     "type": "int",
     "unit": "zones",
     "default": 6,
     "help": "When a pair has no active zone, evaluate up to this many recent gaps and adopt the one already valid at the most advanced stage. This is what auto-sorts a fresh pair straight into Stage 2/3/4.",
     "presets": [
      {
       "label": "4",
       "value": 4
      },
      {
       "label": "6 (default)",
       "value": 6
      },
      {
       "label": "10 (thorough)",
       "value": 10
      }
     ]
    },
    {
     "key": "IMPULSE_MIN_DIR_BODY_RATIO",
     "label": "Impulse Cleanliness",
     "type": "float",
     "unit": "ratio",
     "default": 0.68,
     "help": "Share of the impulse leg's total body that must be in the trade direction. Lower = accept messier impulses (more inflow); higher = only clean one-way moves.",
     "presets": [
      {
       "label": "0.55 (loose)",
       "value": 0.55
      },
      {
       "label": "0.68 (default)",
       "value": 0.68
      },
      {
       "label": "0.80 (strict)",
       "value": 0.8
      }
     ]
    },
    {
     "key": "IMPULSE_MIN_CONSEC_DISPLACEMENT",
     "label": "Min Consecutive Displacement",
     "type": "int",
     "unit": "candles",
     "default": 3,
     "help": "Longest run of same-direction candles the impulse must contain. Lower = more impulses qualify (more inflow).",
     "presets": [
      {
       "label": "2 (loose)",
       "value": 2
      },
      {
       "label": "3 (default)",
       "value": 3
      },
      {
       "label": "4 (strict)",
       "value": 4
      }
     ]
    },
    {
     "key": "RETRACEMENT_MIN_FVG_GAP_ATR",
     "label": "Min Liquidity↔FVG Gap",
     "type": "float",
     "unit": "x ATR",
     "default": 0.2,
     "help": "Required clean gap between the first-liquidity line and the FVG edge. Lower = more Stage-1 locks qualify (more inflow).",
     "presets": [
      {
       "label": "0.10 (loose)",
       "value": 0.1
      },
      {
       "label": "0.20 (default)",
       "value": 0.2
      },
      {
       "label": "0.35 (strict)",
       "value": 0.35
      }
     ]
    },
    {
     "key": "RETRACEMENT_FVG_CLEARANCE_ATR",
     "label": "FVG Clearance Buffer",
     "type": "float",
     "unit": "x ATR",
     "default": 0.12,
     "help": "Extra clearance the retracement must leave around the FVG. Lower = looser detection (more inflow).",
     "presets": [
      {
       "label": "0.06 (loose)",
       "value": 0.06
      },
      {
       "label": "0.12 (default)",
       "value": 0.12
      },
      {
       "label": "0.20 (strict)",
       "value": 0.2
      }
     ]
    },
    {
     "key": "ZONE_TTL_SECONDS",
     "label": "Stage 1 & 2 Lifetime",
     "type": "int",
     "unit": "seconds",
     "default": 86400,
     "help": "How long a forming Stage 1/2 setup is kept before it expires unused. Default is 24 hours.",
     "presets": [
      {
       "label": "12 hours",
       "value": 43200
      },
      {
       "label": "24 hours (default)",
       "value": 86400
      },
      {
       "label": "48 hours",
       "value": 172800
      }
     ]
    },
    {
     "key": "MAX_ZONE_AGE_CANDLES",
     "label": "Stage 1 & 2 Max Age",
     "type": "int",
     "unit": "candles",
     "default": 96,
     "help": "Hard age ceiling in 15m candles for a forming setup (96 = 24 hours).",
     "presets": [
      {
       "label": "48 (12h)",
       "value": 48
      },
      {
       "label": "96 (24h, default)",
       "value": 96
      },
      {
       "label": "192 (48h)",
       "value": 192
      }
     ]
    },
    {
     "key": "FORMING_EVICTION_ENABLED",
     "label": "Evict Stale Forming Setups",
     "type": "toggle",
     "default": true,
     "help": "Free a symbol's slot when a Stage 1/2 setup hasn't advanced within the window below, so the pair can re-sort to a fresher setup. Committed Stage 3/4/5 are never evicted."
    },
    {
     "key": "FORMING_STALE_TTL_SECONDS",
     "label": "Forming Setup Stale Window",
     "type": "int",
     "unit": "seconds",
     "default": 21600,
     "help": "How long a Stage 1/2 setup may sit without advancing a stage before it is evicted. Default 6 hours.",
     "presets": [
      {
       "label": "3 hours",
       "value": 10800
      },
      {
       "label": "6 hours (default)",
       "value": 21600
      },
      {
       "label": "12 hours",
       "value": 43200
      }
     ]
    },
    {
     "key": "DIAG_CYCLE_LOG",
     "label": "Diagnostic Cycle Log (container logs)",
     "type": "toggle",
     "default": true,
     "help": "DIAG (S20): print one [DIAG] line per scan cycle to the container logs (stdout) — stage counts, pick sizes, per-cycle API ok/err, thin-skip and zones-found deltas. Zero extra API calls. Use it to watch the funnel degrade live, then turn off after diagnosis."
    },
    {
     "key": "STAGE0_REQUIRE_STAGE1_TO_LOCK",
     "label": "Lock Zones Only At Stage 1+",
     "type": "toggle",
     "default": true,
     "help": "v7.5 fix (S21): treat a bare FVG (Stage 0) as a background probe, not a commitment. A symbol only stores/locks a zone once it qualifies for Stage 1 (first liquidity + BoS), so dead Stage-0 zones can never accumulate and exhaust slots (the freeze fix). Turn off to revert to legacy Stage-0 locking."
    }
   ]
  },
  {
   "id": "risk",
   "title": "Risk, Leverage & Trade Costs",
   "summary": "Position sizing, leverage, stop/target structure, and the cost-aware net-R accounting used in Trade History.",
   "fields": [
    {
     "key": "LEV_TARGET_SL_LOSS_PCT",
     "label": "Target Loss At Stop",
     "type": "float",
     "unit": "% of margin",
     "default": 50,
     "help": "Leverage is auto-chosen so that hitting the stop costs roughly this share of margin.",
     "presets": [
      {
       "label": "30%",
       "value": 30
      },
      {
       "label": "50% (default)",
       "value": 50
      },
      {
       "label": "70%",
       "value": 70
      }
     ]
    },
    {
     "key": "LEV_MIN",
     "label": "Minimum Leverage",
     "type": "int",
     "unit": "x",
     "default": 20,
     "help": "Lower bound for auto leverage.",
     "presets": [
      {
       "label": "10x",
       "value": 10
      },
      {
       "label": "20x (default)",
       "value": 20
      }
     ]
    },
    {
     "key": "LEV_MAX",
     "label": "Maximum Leverage",
     "type": "int",
     "unit": "x",
     "default": 50,
     "help": "Upper bound for auto leverage (also capped by each pair's exchange max).",
     "presets": [
      {
       "label": "25x",
       "value": 25
      },
      {
       "label": "50x (default)",
       "value": 50
      },
      {
       "label": "75x",
       "value": 75
      }
     ]
    },
    {
     "key": "MIN_STOP_PCT",
     "label": "Minimum Stop Distance",
     "type": "float",
     "unit": "%",
     "default": 0.45,
     "help": "Floor on stop distance so stops are never dangerously tight.",
     "presets": [
      {
       "label": "0.30%",
       "value": 0.3
      },
      {
       "label": "0.45% (default)",
       "value": 0.45
      },
      {
       "label": "0.70%",
       "value": 0.7
      }
     ]
    },
    {
     "key": "TP_MIN_RR",
     "label": "TP Minimum Risk / Reward",
     "type": "float",
     "unit": "R",
     "default": 1.5,
     "help": "Reward floor for the single structural take-profit. The TP is the nearest opposing liquidity beyond entry, but is never placed below this multiple of risk.",
     "presets": [
      {
       "label": "1.2R",
       "value": 1.2
      },
      {
       "label": "1.5R (default)",
       "value": 1.5
      },
      {
       "label": "2.0R",
       "value": 2.0
      }
     ]
    },
    {
     "key": "TP_MAX_RR",
     "label": "TP Maximum Risk / Reward",
     "type": "float",
     "unit": "R",
     "default": 5.0,
     "help": "Reward ceiling for the single structural take-profit. The dynamic target floats inside the min-to-max band by volatility regime, so a far liquidity pool is never chased beyond this multiple.",
     "presets": [
      {
       "label": "3.0R",
       "value": 3.0
      },
      {
       "label": "5.0R (default)",
       "value": 5.0
      },
      {
       "label": "7.0R",
       "value": 7.0
      }
     ]
    },
    {
     "key": "SINGLE_TP_BREAKEVEN_ENABLED",
     "label": "Move Stop To Break-Even",
     "type": "toggle",
     "default": true,
     "help": "With a single take-profit, arm the stop to break-even once price has travelled at least one unit of risk in your favour. Protects the only loss-buffer the trade has; recommended on."
    },
    {
     "key": "SL_BEYOND_LIQUIDITY_ENABLED",
     "label": "Stop Beyond Liquidity",
     "type": "toggle",
     "default": true,
     "help": "Push the stop just past the swept liquidity pool (anti stop-run). Only ever widens the stop, never tightens it."
    },
    {
     "key": "COST_AWARE_ENABLED",
     "label": "Cost-Aware Expectancy",
     "type": "toggle",
     "default": true,
     "help": "Adjust every result for taker fees, slippage and funding, and reject a setup whose net reward-to-risk is below the floor. Recommended on."
    },
    {
     "key": "FEE_TAKER_PCT",
     "label": "Taker Fee",
     "type": "float",
     "unit": "% / side",
     "default": 0.04,
     "step": 0.01,
     "help": "Exchange taker fee charged on each side of the trade (entry and exit).",
     "presets": [
      {
       "label": "0.02%",
       "value": 0.02
      },
      {
       "label": "0.04% (default)",
       "value": 0.04
      },
      {
       "label": "0.06%",
       "value": 0.06
      }
     ]
    },
    {
     "key": "SLIPPAGE_PCT",
     "label": "Slippage Haircut",
     "type": "float",
     "unit": "% / side",
     "default": 0.03,
     "step": 0.01,
     "help": "Assumed execution slippage per side. Larger for low-turnover pairs.",
     "presets": [
      {
       "label": "0.02%",
       "value": 0.02
      },
      {
       "label": "0.03% (default)",
       "value": 0.03
      },
      {
       "label": "0.06%",
       "value": 0.06
      }
     ]
    },
    {
     "key": "MIN_NET_RR",
     "label": "Minimum Net RR",
     "type": "float",
     "unit": "R",
     "default": 1.3,
     "step": 0.1,
     "help": "Reject a candidate setup whose structural take-profit gives less than this reward-to-risk AFTER costs.",
     "presets": [
      {
       "label": "1.0R",
       "value": 1.0
      },
      {
       "label": "1.3R (default)",
       "value": 1.3
      },
      {
       "label": "1.6R",
       "value": 1.6
      }
     ]
    },
    {
     "key": "CALIBRATION_MIN_TRADES",
     "label": "Calibration Minimum Trades",
     "type": "int",
     "unit": "trades",
     "default": 10,
     "help": "How many closed trades must exist before the feature-calibration panel is marked ready (it still previews earlier).",
     "presets": [
      {
       "label": "10 (default)",
       "value": 10
      },
      {
       "label": "25",
       "value": 25
      },
      {
       "label": "50",
       "value": 50
      }
     ]
    }
   ]
  },
  {
   "id": "promotion",
   "title": "Promotion · Smart Stage 4",
   "summary": "The single v8 Stage-4 brain that decides — while price is still in the FVG — whether a setup promotes to a verified entry. Led by the PROMOTION master switch.",
   "fields": [
    {
     "key": "PROMOTION_ENABLED",
     "label": "Promotion (Stage 4 -> 5)",
     "type": "toggle",
     "default": true,
     "help": "Master switch for verified-entry promotion: when ON, a screened Stage-4 setup can promote to a Stage-5 verified entry and fire alerts. OFF freezes the funnel at Stage 4 (no signals). On by default."
    },
    {
     "key": "FILTER_HTF_ENABLED",
     "label": "Gate · Higher-Timeframe Bias",
     "type": "toggle",
     "default": true,
     "help": "Compulsory gate: the 1H/4H trend must agree with the setup direction."
    },
    {
     "key": "HTF_INTERVAL",
     "label": "Higher-Timeframe Bias Window",
     "type": "select",
     "default": "Min60",
     "help": "Timeframe used for the higher-timeframe bias gate.",
     "presets": [
      {
       "label": "30 minutes",
       "value": "Min30"
      },
      {
       "label": "1 hour (default)",
       "value": "Min60"
      },
      {
       "label": "4 hours",
       "value": "Hour4"
      }
     ]
    },
    {
     "key": "CONVICTION_MIN_CONFLUENCE",
     "label": "Minimum Confluence To Promote",
     "type": "int",
     "unit": "of 7 facts",
     "default": 5,
     "step": 1,
     "help": "How many of the 7 leading facts (HTF location, swept+reclaimed, OB+FVG overlap, displacement origin, footprint with us, BTC permission, clear path to TP) must be TRUE before a setup may promote to Stage 5. Higher = stricter, fewer but cleaner entries.",
     "presets": [
      {
       "label": "4 (looser)",
       "value": 4
      },
      {
       "label": "5 (default)",
       "value": 5
      },
      {
       "label": "6 (strict)",
       "value": 6
      }
     ]
    },
    {
     "key": "CONVICTION_CONFIRM_CYCLES",
     "label": "Confirm Cycles",
     "type": "int",
     "unit": "cycles",
     "default": 2,
     "help": "How many consecutive scan cycles Conviction must stay at or above the threshold before promotion, so a single noisy print does not trigger an entry. A fresh lower-timeframe break in our direction still fast-tracks promotion regardless of this.",
     "presets": [
      {
       "label": "1 (Instant)",
       "value": 1
      },
      {
       "label": "2 (Default)",
       "value": 2
      },
      {
       "label": "3 (Studied)",
       "value": 3
      }
     ]
    },
    {
     "key": "CONVICTION_OB_ATR",
     "label": "Order-Block Proximity",
     "type": "float",
     "unit": "x ATR",
     "default": 0.6,
     "help": "How close, in ATR units, an order block must sit to the fair-value-gap zone to count as confluence in the E2 chip. Larger accepts looser overlaps.",
     "presets": [
      {
       "label": "0.4 (Tight)",
       "value": 0.4
      },
      {
       "label": "0.6 (Default)",
       "value": 0.6
      },
      {
       "label": "1.0 (Loose)",
       "value": 1.0
      }
     ]
    },
    {
     "key": "CONVICTION_DEAD_TURNOVER",
     "label": "Dead-Pair Turnover Skip",
     "type": "float",
     "unit": "quote turnover",
     "default": 0.0,
     "help": "Optional 24h quote-turnover floor below which a pair is treated as too illiquid to study and is skipped. Leave at 0 to disable the skip entirely.",
     "presets": [
      {
       "label": "0 (Disabled)",
       "value": 0
      },
      {
       "label": "1000000 (1M)",
       "value": 1000000
      },
      {
       "label": "5000000 (5M)",
       "value": 5000000
      }
     ]
    },
    {
     "key": "PD_LOOKBACK",
     "label": "Premium / Discount Range Window",
     "type": "int",
     "unit": "candles",
     "default": 80,
     "help": "How many recent 15m candles define the swing range used to locate equilibrium for the E2 discount/premium read (and the legacy P/D gate). Larger = a broader, slower range; smaller = a tighter, more reactive one. Minimum 20.",
     "presets": [
      {
       "label": "40 (Tight)",
       "value": 40
      },
      {
       "label": "80 (Default)",
       "value": 80
      },
      {
       "label": "120 (Broad)",
       "value": 120
      }
     ]
    },
    {
     "key": "REGIME_ATR_MA",
     "label": "Volatility Regime Baseline",
     "type": "int",
     "unit": "candles",
     "default": 30,
     "help": "Lookback for the ATR baseline that the E7 vitality / volatility-regime read compares the current ATR against (also used by the legacy regime gate). Larger = a steadier baseline. Minimum 10.",
     "presets": [
      {
       "label": "20 (Fast)",
       "value": 20
      },
      {
       "label": "30 (Default)",
       "value": 30
      },
      {
       "label": "50 (Steady)",
       "value": 50
      }
     ]
    },
    {
     "key": "ENTRY_MODEL_ENABLED",
     "label": "Entry-Model Recognition",
     "type": "toggle",
     "default": true,
     "help": "Require the engine to recognise a named human entry model (wick rejection, impulse reclaim, FVG tap, consolidation break, failed-then-reclaim) before promoting. Off = confluence count alone decides."
    },
    {
     "key": "EM_WICK_BODY_RATIO",
     "label": "Wick-Rejection Ratio",
     "type": "float",
     "unit": "wick / body",
     "default": 1.5,
     "step": 0.1,
     "help": "Minimum rejection-wick to candle-body ratio for the closed candle to qualify as a wick-rejection entry model. Higher = only long, decisive rejection wicks count.",
     "presets": [
      {
       "label": "1.2",
       "value": 1.2
      },
      {
       "label": "1.5 (default)",
       "value": 1.5
      },
      {
       "label": "2.0 (strict)",
       "value": 2.0
      }
     ]
    },
    {
     "key": "EM_DISPLACEMENT_ATR",
     "label": "Impulse-Reclaim Body (ATR)",
     "type": "float",
     "unit": "ATR",
     "default": 1.0,
     "step": 0.1,
     "help": "Minimum candle body (in ATRs) for the impulse-reclaim entry model — the reclaim candle must show real commitment, not a weak tap.",
     "presets": [
      {
       "label": "0.8",
       "value": 0.8
      },
      {
       "label": "1.0 (default)",
       "value": 1.0
      },
      {
       "label": "1.3",
       "value": 1.3
      }
     ]
    },
    {
     "key": "EM_COIL_MIN",
     "label": "Consolidation Candles",
     "type": "int",
     "unit": "candles",
     "default": 3,
     "step": 1,
     "help": "Minimum number of tight candles that must coil inside/at the zone before a consolidation-break entry model can trigger.",
     "presets": [
      {
       "label": "2",
       "value": 2
      },
      {
       "label": "3 (default)",
       "value": 3
      },
      {
       "label": "4",
       "value": 4
      }
     ]
    },
    {
     "key": "EM_RECLAIM_MAX",
     "label": "Failed-Reclaim Window",
     "type": "int",
     "unit": "candles",
     "default": 4,
     "step": 1,
     "help": "Maximum candles allowed between a failed break and the reclaim for the failed-then-reclaim (spring) entry model to remain valid.",
     "presets": [
      {
       "label": "3",
       "value": 3
      },
      {
       "label": "4 (default)",
       "value": 4
      },
      {
       "label": "6",
       "value": 6
      }
     ]
    },
    {
     "key": "EM_REACTION_WINDOW",
     "label": "Reaction Lookback (Candles)",
     "type": "int",
     "unit": "candles",
     "default": 3,
     "help": "How many recent closed candles the engine scans for the entry reaction. Larger catches a trigger that happened a few candles ago (useful with sharded scanning); smaller is stricter about a fresh reaction."
    },
    {
     "key": "CALIB_MIN_SAMPLES",
     "label": "Self-Tuning Min Trades",
     "type": "int",
     "unit": "trades",
     "default": 20,
     "help": "How many completed Smart-v8 trades must exist before the system may auto-adjust its own confluence bar. Until then the bar is fixed. The hard Bitcoin veto is never tuned."
    },
    {
     "key": "FOOTPRINT_ENABLED",
     "label": "Anchored Footprint",
     "type": "toggle",
     "default": true,
     "help": "Use the zone-anchored cumulative footprint as the PRIMARY order-flow read for Stage 4 (E3) and confluence. Off = fall back to the legacy short deals-tape snapshot."
    },
    {
     "key": "FOOTPRINT_MIN_SAMPLES",
     "label": "Minimum Samples Before Trusted",
     "type": "int",
     "unit": "samples",
     "default": 2,
     "step": 1,
     "help": "How many accumulation cycles the footprint must gather at a zone before its read is trusted. Lower = reacts faster but noisier; higher = steadier but slower to confirm.",
     "presets": [
      {
       "label": "1 (fastest)",
       "value": 1
      },
      {
       "label": "2 (default)",
       "value": 2
      },
      {
       "label": "3 (steady)",
       "value": 3
      }
     ]
    },
    {
     "key": "FOOTPRINT_STRONG_PCT",
     "label": "Strong-Flow Threshold",
     "type": "float",
     "unit": "delta share",
     "default": 0.12,
     "step": 0.01,
     "help": "Signed-delta share of total throughput at which flow counts as 'strong' (absorption / distribution / with-us). 0.12 = 12% net imbalance. Higher = only decisive imbalances flag.",
     "presets": [
      {
       "label": "0.08",
       "value": 0.08
      },
      {
       "label": "0.12 (default)",
       "value": 0.12
      },
      {
       "label": "0.20 (strict)",
       "value": 0.2
      }
     ]
    },
    {
     "key": "FOOTPRINT_MIN1_LIMIT",
     "label": "Min1 Bars Pulled",
     "type": "int",
     "unit": "bars",
     "default": 240,
     "step": 10,
     "help": "How many 1-minute delta bars are pulled per accumulation cycle to build the footprint backbone. More = deeper history per read, slightly more bandwidth.",
     "presets": [
      {
       "label": "120",
       "value": 120
      },
      {
       "label": "240 (default)",
       "value": 240
      },
      {
       "label": "360",
       "value": 360
      }
     ]
    },
    {
     "key": "FOOTPRINT_OI_MIN_GAP",
     "label": "OI Sample Gap",
     "type": "int",
     "unit": "seconds",
     "default": 60,
     "step": 5,
     "help": "Minimum seconds between open-interest samples folded into the footprint. Lower = finer OI resolution but more requests.",
     "presets": [
      {
       "label": "30",
       "value": 30
      },
      {
       "label": "60 (default)",
       "value": 60
      },
      {
       "label": "120",
       "value": 120
      }
     ]
    },
    {
     "key": "FOOTPRINT_OI_KEEP",
     "label": "OI Samples Retained",
     "type": "int",
     "unit": "samples",
     "default": 90,
     "step": 5,
     "help": "How many recent OI samples the footprint keeps for its OI-delta read. More = longer OI memory at the zone.",
     "presets": [
      {
       "label": "60",
       "value": 60
      },
      {
       "label": "90 (default)",
       "value": 90
      },
      {
       "label": "120",
       "value": 120
      }
     ]
    }
   ]
  },
  {
   "id": "market_regime",
   "title": "Market Regime & Portfolio Risk",
   "summary": "Broad-market permission gate plus the portfolio risk gate (net-RR floor + correlation-heat caps) and setup-stability pre-checks.",
   "fields": [
    {
     "key": "MARKET_PERMISSION_ENABLED",
     "label": "Market Permission Gate",
     "type": "toggle",
     "default": true,
     "help": "Block promotions that fight the broad market. Combines Bitcoin's lower-timeframe trend with the Market Bias read: against = blocked, leaning-against = no top grade, supportive = normal."
    },
    {
     "key": "MARKET_PERMISSION_STRICT",
     "label": "Strict Market Permission",
     "type": "toggle",
     "default": false,
     "help": "When on, even a market that merely leans against the trade blocks promotion (not just a fully opposed one). Off (default) lets leaning-against setups through at a reduced grade."
    },
    {
     "key": "PORTFOLIO_RISK_ENABLED",
     "label": "Portfolio Risk Gate",
     "type": "toggle",
     "default": true,
     "help": "ONE master for the pre-trade risk gate: rejects setups whose NET reward-to-risk (after fee + slippage) is below Min Net RR, and caps how many trades — and how many in the SAME direction — can be live at once, so a single market move can’t hit the whole book. On by default."
    },
    {
     "key": "MAX_CONCURRENT_TRADES",
     "label": "Max Live Trades",
     "type": "int",
     "unit": "trades",
     "default": 6,
     "help": "Most trades allowed live at the same time. Further promotions wait until a slot frees up."
    },
    {
     "key": "MAX_ALIGNED_DIRECTION",
     "label": "Max Same-Direction Trades",
     "type": "int",
     "unit": "trades",
     "default": 3,
     "help": "Most trades allowed live in the SAME direction at once. Prevents stacking the book all long or all short into one regime move."
    },
    {
     "key": "STABILITY_MIN_CYCLES",
     "label": "Stability Confirm Reads",
     "type": "int",
     "unit": "reads",
     "default": 2,
     "help": "How many consecutive scan reads the leading structure must stay consistent before a non-top setup promotes. A clean, market-aligned top setup still promotes immediately."
    },
    {
     "key": "STABILITY_ADVERSE_ATR",
     "label": "Adverse Candle Block (ATR)",
     "type": "float",
     "unit": "ATR",
     "default": 1.0,
     "help": "Don't promote into a large closed candle moving against the trade this size (in ATR). Cheap insurance against entering right as price lurches the wrong way."
    }
   ]
  },
  {
   "id": "guardian",
   "title": "Live Management · Smart Stage 5",
   "summary": "The post-entry Guardian: the single v8 advisory brain (Drive/Risk + structural exit verdict, reversible) plus chip-stability smoothing.",
   "fields": [
    {
     "key": "GUARDIAN_ENABLED",
     "label": "Trade Guardian Enabled",
     "type": "toggle",
     "default": true,
     "help": "Master switch for the Stage 5 post-entry conviction layer. When off, verified entries are still managed by stop-loss, break-even and take-profit, but no live Drive/Risk scoring or advisory verdicts are produced."
    },
    {
     "key": "GUARDIAN_CVD_ENABLED",
     "label": "Use Live Order Flow (CVD)",
     "type": "toggle",
     "default": true,
     "help": "Read the live trade tape to compute Cumulative Volume Delta (aggressor buying vs selling). This is the sharpest early exhaustion tell. When off, a candle-derived volume-delta proxy is used instead, which needs no extra request."
    },
    {
     "key": "GUARDIAN_LTF_INTERVAL",
     "label": "Lower-Timeframe Window",
     "type": "select",
     "default": "Min5",
     "help": "The timeframe the Guardian watches for early structure shifts (break of structure and change of character) beneath your 15-minute entry. Smaller reacts faster but is noisier.",
     "presets": [
      {
       "label": "1 minute (fastest)",
       "value": "Min1"
      },
      {
       "label": "5 minutes (default)",
       "value": "Min5"
      },
      {
       "label": "15 minutes (calm)",
       "value": "Min15"
      }
     ]
    },
    {
     "key": "GUARDIAN_REJECT_ATR",
     "label": "Rejection-Zone Reach",
     "type": "float",
     "unit": "x ATR",
     "default": 1.2,
     "help": "How close (in ATR units) an opposing fair-value gap, liquidity pool or range equilibrium must be before the Guardian warns that price is approaching a rejection zone. Larger warns earlier.",
     "presets": [
      {
       "label": "0.8 (only when very close)",
       "value": 0.8
      },
      {
       "label": "1.2 (default)",
       "value": 1.2
      },
      {
       "label": "2.0 (warn early)",
       "value": 2.0
      }
     ]
    },
    {
     "key": "GUARDIAN_TERMINAL_CONFIRMS",
     "label": "Close Confirmation Cycles",
     "type": "int",
     "unit": "cycles",
     "default": 3,
     "help": "How many consecutive scan cycles the reversal conditions must all hold before the terminal Close Before Reversal verdict latches. Higher is slower to call a close but harder to fool, so you are less likely to be shaken out before a big move. (Legacy — v7.5 only; has no effect while the Smart Engine is on.)",
     "presets": [
      {
       "label": "2 (responsive)",
       "value": 2
      },
      {
       "label": "3 (default)",
       "value": 3
      },
      {
       "label": "5 (very strict)",
       "value": 5
      }
     ]
    },
    {
     "key": "GUARDIAN_TERMINAL_MIN_CONF",
     "label": "Close Confidence Floor",
     "type": "int",
     "unit": "/ 100",
     "default": 80,
     "help": "Minimum confidence (0-100) the engine must reach before it is allowed to latch a terminal close. Raising it makes the close verdict rarer and more certain. (Legacy — v7.5 only; has no effect while the Smart Engine is on.)",
     "presets": [
      {
       "label": "70 (earlier)",
       "value": 70
      },
      {
       "label": "80 (default)",
       "value": 80
      },
      {
       "label": "90 (only when certain)",
       "value": 90
      }
     ]
    },
    {
     "key": "CHIP_STABILITY_ENABLED",
     "label": "Chip Status Debounce",
     "type": "toggle",
     "default": true,
     "help": "On (default) a Drive/Risk chip only flips its status after the new state persists for the confirm cycles below, so a single noisy print does not toggle it. Off shows the raw per-cycle state. (Legacy — v7.5 only; has no effect while the Smart Engine is on.)"
    },
    {
     "key": "CHIP_CONFIRM_CYCLES",
     "label": "Chip Confirm Cycles",
     "type": "int",
     "unit": "cycles",
     "default": 2,
     "help": "How many consecutive cycles a chip's new status must hold before it is shown. Higher means calmer chips that ignore one-off ticks; lower means more reactive chips. (Legacy — v7.5 only; has no effect while the Smart Engine is on.)",
     "presets": [
      {
       "label": "1 (Reactive)",
       "value": 1
      },
      {
       "label": "2 (Default)",
       "value": 2
      },
      {
       "label": "3 (Calm)",
       "value": 3
      }
     ]
    },
    {
     "key": "RETRACE_GUARD_ENABLED",
     "label": "Retrace vs Reversal Guard",
     "type": "toggle",
     "default": true,
     "help": "On (default) a shallow pullback into a defended zone on light volume with order flow still net-favourable and no lower-timeframe change-of-character is treated as continuation and can never latch the terminal 'Close Before Reversal' verdict — only a structurally confirmed reversal can. Off lets the raw latch fire."
    },
    {
     "key": "VERDICT_ZONE_BAND_ATR",
     "label": "Entry Zone Width",
     "type": "float",
     "unit": "x ATR",
     "default": 0.75,
     "help": "How wide, in ATR units, the entry zone is considered when no fair-value-gap zone is attached to the live trade. Price within this band of entry reads as still in the entry zone, so the verdict reasons about whether that zone is holding or about to fail.",
     "presets": [
      {
       "label": "0.5 (Tight)",
       "value": 0.5
      },
      {
       "label": "0.75 (Default)",
       "value": 0.75
      },
      {
       "label": "1.2 (Wide)",
       "value": 1.2
      }
     ]
    }
   ]
  },
  {
   "id": "display",
   "title": "Display",
   "summary": "Dashboard presentation.",
   "fields": [
    {
     "key": "DASHBOARD_REFRESH_SECONDS",
     "label": "Dashboard Refresh",
     "type": "int",
     "unit": "seconds",
     "default": 20,
     "help": "How often the live dashboard pulls fresh state. Rows and counters update in place with no page reload.",
     "presets": [
      {
       "label": "10 seconds (snappy)",
       "value": 10
      },
      {
       "label": "20 seconds (default)",
       "value": 20
      },
      {
       "label": "45 seconds (calm)",
       "value": 45
      }
     ]
    }
   ]
  }
 ]
}