assert_exit_at

forge.testingfunctionSince Forge API 1
Signaturepython
forge.testing.assert_exit_at(run: TestRun,bar: int,*,side: str | None = None,reason: str | None = None) -> None

An exit was filled on primary bar bar, closing a position of side and for reason.

Parameters

NameTypeDefault
runTestRun
barint
sidestr | NoneNone
reasonstr | NoneNone

reason is the fill's reason in the run's exits table, such as "stop" or "target".