QuaScript DocumentationLanguage guide, engine API, 601 builtins and the preset library · v3.0.0-phase1 exitGenerated from the engine catalog by tools/gen-docs.mjs; do not edit.exit.bracketscript.qsexit.bracket(id, entry = , stop = na, target = na, trail_offset = na, trail_trigger = na, qty = na, qty_pct = 100, unit = price)Stop / target / trailing exit for an entry (or all lots); stop and target cancel each other.ArgumentKindDefaultNotesidtextrequiredentrytext""stopnumnatargetnumnatrail_offsetnumnatrail_triggernumnaqtynumnaqty_pctnum100unittextpriceone of price, ticksexit.closescript.qsexit.close(id, qty = na, qty_pct = 100)Closes the lots opened by entry id at the next open.ArgumentKindDefaultNotesidtextrequiredqtynumnaqty_pctnum100exit.close_allscript.qsexit.close_all()Flattens the position at the next open.← orderposition →All 81 chaptersGuideGetting startedScript headersLanguage basicsFunctionsStructs, enums and traitsLibrariesParametersRenderingColorsDrawingsCollectionsTime, sessions and dataStrategiesBotsExecution modelBuilding complex analysesAdvancedChart styles by exampleEngineEngine APIPerformanceDiagnosticsReferenceta: technical analysisstat: statisticsmathcolorrender: outputsdraw: drawing objectsarraylistmapgridtablestr: textparam: settingsbarassetintervaltimesessionfeed: other intervalsalertorderexitpositionportfolioriskbook: order book (host data)orderbook (host data)derivative (host data)financial (host data)option pricinganchorshapestyleraysidepanechartaccounthftPresetsEvery chartGalleryLanguage showcasesbookFundamentals and flowsWebGPU StudioMicrostructureTrendlines and levelsMoving averagesMomentumMultiple intervalsLayoutsMarket structureStatisticsTrendVolatilityVolumeVertical panesBotsChart stylesLibrariesStrategies