Place OCO stop brackets for the catalog's obfuscation options
When an account type opts in, legs are placed as an OCO pair via order/placeoco - the usual limit plus a stop: the first cycle day's stop keeps the day's net floor at -$1,000, min-day trades stop at 2x their target, and the day after any red day rides stopless to make it back. A stop-out books the day: eligibility refuses the account once realized P&L falls short of the legs fired (or is simply negative on an opted-in account, which survives restarts). If placeoco is rejected the leg falls back to the classic lone limit with a loud log rather than leave a position without an exit. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Fable 5
parent
ae0f93a44f
commit
c58e981b1e
@@ -56,6 +56,10 @@ export const BIG_DAY_THRESHOLD = 1700;
|
||||
export const MIN_LEG = 500;
|
||||
/** After at least one trade, a residual at or below this counts as "day done". */
|
||||
export const LEG_COMPLETION_EPSILON = 25;
|
||||
/** firstDayStop: the first cycle day books at this loss and stops. */
|
||||
export const FIRST_DAY_STOP = 1000;
|
||||
/** minDayStop: a min-day trade's stop sits at this multiple of its target. */
|
||||
export const MIN_DAY_STOP_MULT = 2;
|
||||
/** Safety valve: never fire more than this many legs per account per trade date. */
|
||||
export const MAX_LEGS_PER_DAY = 8;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user