QuaScript DocumentationLanguage guide, engine API, 601 builtins and the preset library · v3.0.0-phase1 positionGenerated from the engine catalog by tools/gen-docs.mjs; do not edit.position.avg_pricescript.qsposition.avg_priceAverage entry price (na when flat).position.bars_heldscript.qsposition.bars_heldBars since the first open lot.position.entry_timescript.qsposition.entry_timeTime of the first open lot.position.open_pnlscript.qsposition.open_pnlUnrealized profit at the close.position.sidescript.qsposition.side1 long, -1 short, 0 flat.position.sizescript.qsposition.sizeSigned position quantity.← exitportfolio →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