fix: batch backtest, set comparator and config editor

Batch Backtest:
- Fix run_batch signature missing report_names parameter (recurring)
- Add inline config editor to Active Config expander — edit and save
  all settings directly from the UI without re-running CLI script

Set Comparator:
- Fix UTF-8/UTF-16 encoding detection using BOM check
- Fix parse to skip optimisation metadata lines (ParamName,F etc.)
- Fix export to preserve all original lines including metadata
- Add UBS format detection — warning shown for non-Ultimate Breakout files
- Fix view_set_comparator to unpack 4-value return from parse_set_file
This commit is contained in:
unknown
2026-04-14 15:46:27 +10:00
parent 25b734a559
commit 789cf67bba
4 changed files with 113 additions and 72 deletions
+9 -2
View File
@@ -53,14 +53,21 @@ def render():
if uploaded is not None:
file_bytes = uploaded.read()
fname = uploaded.name
params, raw_lines, order = parse_set_file(file_bytes, fname)
params, raw_lines, order, is_ubs = parse_set_file(file_bytes, fname)
st.session_state['ea_files'][fname] = params
st.session_state['ea_raw'][fname] = raw_lines
st.session_state['ea_order'][fname] = order
st.session_state['ea_bytes'][fname] = file_bytes
if fname not in st.session_state['ea_edited']:
st.session_state['ea_edited'][fname] = params.copy()
st.success(f"{fname}{len(params)} params")
if is_ubs:
st.success(f"{fname}{len(params)} params")
else:
st.warning(
f"⚠️ {fname} — this file does not appear to be an "
f"Ultimate Breakout System .set file. The comparator is "
f"optimised for UBS format only. Results may be incomplete."
)
# ── Comparison table ──────────────────────────────────────────────────────
files_data = st.session_state['ea_files']