Flip indicators for short trades in feature notebook - #38
Conversation
There was a problem hiding this comment.
Codex Review: Here are some suggestions.
Reply with @codex fix comments to fix any unresolved comments.
About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you open a pull request for review, mark a draft as ready, or comment "@codex review". If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex fix this CI failure" or "@codex address that feedback".
| "# Align indicator values so short trades mirror the long setup", | ||
| "if \'Open_Trade\' not in df_diff.columns:", | ||
| " if \'Open_Trade\' in df.columns:", | ||
| " df_diff = pd.merge(", | ||
| " df_diff,", | ||
| " df[[\'Date\', \'Open_Trade\']],", | ||
| " on=\'Date\',", |
There was a problem hiding this comment.
[P1] Fix invalid escaping in notebook cell
The added cell is not valid JSON: running python -m json.tool 7_XAUUSD_Long_Short_Features.ipynb now fails with Invalid \escape: line 4520 column 13 (char 199663), while the parent version loads correctly. The new strings include backslashes that don’t form legal JSON escapes (e.g. "if \'Open_Trade\' not in df_diff.columns:"), so the notebook cannot be opened by Jupyter or any JSON parser. Re‑save the notebook or adjust the inserted code so the JSON contains only valid escape sequences.
Useful? React with 👍 / 👎.
Summary
Open_Tradeis -1Open_Tradecolumn into the diff feature frame when it is missing so the adjustment can be appliedTesting
https://chatgpt.com/codex/tasks/task_e_68cac422a7d883288a3c3083bd0e2497