Skip to content

Flip indicators for short trades in feature notebook - #38

Open
holguinmora123 wants to merge 1 commit into
mainfrom
codex/add-feature-flipping-for-short-trades
Open

Flip indicators for short trades in feature notebook#38
holguinmora123 wants to merge 1 commit into
mainfrom
codex/add-feature-flipping-for-short-trades

Conversation

@holguinmora123

Copy link
Copy Markdown
Owner

Summary

  • flip numeric indicator features to align short trades with long trades when Open_Trade is -1
  • merge the Open_Trade column into the diff feature frame when it is missing so the adjustment can be applied

Testing

  • not run (not requested)

https://chatgpt.com/codex/tasks/task_e_68cac422a7d883288a3c3083bd0e2497

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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".

Comment on lines +4519 to +4525
"# 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\',",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[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 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant