Skip to content

Enhance take-profit and stop-loss input calculations#202

Open
taherdhanera wants to merge 1 commit into
capofficial:mainfrom
taherdhanera:taherdhanera-tpsl-calculation-workbench-17
Open

Enhance take-profit and stop-loss input calculations#202
taherdhanera wants to merge 1 commit into
capofficial:mainfrom
taherdhanera:taherdhanera-tpsl-calculation-workbench-17

Conversation

@taherdhanera
Copy link
Copy Markdown

Closes #17.

Requesting consideration for this bounty.

Changes:

  • Adds direction-aware +1%, +2%, and +5% TP/SL move presets for long and short orders.
  • Keeps target price, P/L percent, and P/L amount in the selected collateral asset synchronized through a shared calculation helper.
  • Uses the current limit price when present, otherwise the live market price, as the TP/SL entry basis.
  • Leaves order submission semantics unchanged by continuing to submit only the existing TP/SL target prices.
  • Adds deterministic calculation checks for long/short TP and SL conversions.

Validation:

  • npm run test:tpsl
  • npm run build
  • git diff --check
  • Served the built app locally and confirmed the index responds with the generated bundle reference.

Payment details can be provided if selected.

@taherdhanera
Copy link
Copy Markdown
Author

Note on checks: the Vercel status is failing with Account is blocked and links to Vercel account-block documentation, not to a build/test error. Local validation passed with npm run test:tpsl, npm run build, git diff --check, and a built-app local smoke check.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Enhanced Take-profit and Stop-loss inputs

1 participant