{"version":1,"pages":[{"id":"mXhphd954Uz0qqOGxg3A","title":"Sway Charts Pro User-Defined Indicators","pathname":"/sway-charts-pro-scripts-documentation","siteSpaceId":"sitesp_ygj3Z"},{"id":"E1ePjYKYI0wuoYXMlsgG","title":"Introduction","pathname":"/sway-charts-pro-scripts-documentation/sway-charts-pro-user-defined-indicators/introduction","siteSpaceId":"sitesp_ygj3Z","breadcrumbs":[{"label":"Sway Charts Pro User-Defined Indicators"}]},{"id":"SuhW0KBkcKDqhs29J8lt","title":"1.1 Access to the Sway Charts scripting framework (UDI vs UDIX)","pathname":"/sway-charts-pro-scripts-documentation/sway-charts-pro-user-defined-indicators/introduction/1.1-access-to-the-sway-charts-scripting-framework-udi-vs-udix","siteSpaceId":"sitesp_ygj3Z","breadcrumbs":[{"label":"Sway Charts Pro User-Defined Indicators"},{"label":"Introduction"}]},{"id":"7ZgnjsrokdNfDVKjQaY9","title":"1.2\tExample UDI code","pathname":"/sway-charts-pro-scripts-documentation/sway-charts-pro-user-defined-indicators/introduction/1.2-example-udi-code","siteSpaceId":"sitesp_ygj3Z","breadcrumbs":[{"label":"Sway Charts Pro User-Defined Indicators"},{"label":"Introduction"}]},{"id":"5HmJZPWw5K0afWUH7XEv","title":"1.3\tAdding a UDI to a chart","pathname":"/sway-charts-pro-scripts-documentation/sway-charts-pro-user-defined-indicators/introduction/1.3-adding-a-udi-to-a-chart","siteSpaceId":"sitesp_ygj3Z","breadcrumbs":[{"label":"Sway Charts Pro User-Defined Indicators"},{"label":"Introduction"}]},{"id":"wjcfWrnht490cxyLsyFX","title":"1.4\tLifecycle","pathname":"/sway-charts-pro-scripts-documentation/sway-charts-pro-user-defined-indicators/introduction/1.4-lifecycle","siteSpaceId":"sitesp_ygj3Z","breadcrumbs":[{"label":"Sway Charts Pro User-Defined Indicators"},{"label":"Introduction"}]},{"id":"jhXIsWBuYdXzENNDZLcF","title":"1.5\tAlerts","pathname":"/sway-charts-pro-scripts-documentation/sway-charts-pro-user-defined-indicators/introduction/1.5-alerts","siteSpaceId":"sitesp_ygj3Z","breadcrumbs":[{"label":"Sway Charts Pro User-Defined Indicators"},{"label":"Introduction"}]},{"id":"Er82rtgduJffS8nqSG4R","title":"1.6\tIndicator-on-indicator","pathname":"/sway-charts-pro-scripts-documentation/sway-charts-pro-user-defined-indicators/introduction/1.6-indicator-on-indicator","siteSpaceId":"sitesp_ygj3Z","breadcrumbs":[{"label":"Sway Charts Pro User-Defined Indicators"},{"label":"Introduction"}]},{"id":"eUOjjvkQ7kifeuLyyCOP","title":"1.7\tTechnical note: web workers","pathname":"/sway-charts-pro-scripts-documentation/sway-charts-pro-user-defined-indicators/introduction/1.7-technical-note-web-workers","siteSpaceId":"sitesp_ygj3Z","breadcrumbs":[{"label":"Sway Charts Pro User-Defined Indicators"},{"label":"Introduction"}]},{"id":"ReU95gIgeIVQkYCYDLDN","title":"1.8\tTechnical note: dates","pathname":"/sway-charts-pro-scripts-documentation/sway-charts-pro-user-defined-indicators/introduction/1.8-technical-note-dates","siteSpaceId":"sitesp_ygj3Z","breadcrumbs":[{"label":"Sway Charts Pro User-Defined Indicators"},{"label":"Introduction"}]},{"id":"xvoJWZWXINTBN4SBDNnL","title":"Initialisation: UDI.onInit()","pathname":"/sway-charts-pro-scripts-documentation/sway-charts-pro-user-defined-indicators/initialisation-udi.oninit","siteSpaceId":"sitesp_ygj3Z","breadcrumbs":[{"label":"Sway Charts Pro User-Defined Indicators"}]},{"id":"Z2mWfHlTpWbVfQYXKYel","title":"2.1\tReturn value from UDI.onInit()","pathname":"/sway-charts-pro-scripts-documentation/sway-charts-pro-user-defined-indicators/initialisation-udi.oninit/2.1-return-value-from-udi.oninit","siteSpaceId":"sitesp_ygj3Z","breadcrumbs":[{"label":"Sway Charts Pro User-Defined Indicators"},{"label":"Initialisation: UDI.onInit()"}]},{"id":"yGgr7MiyolHZ1OEbttWx","title":"2.2\tThe plots[] array","pathname":"/sway-charts-pro-scripts-documentation/sway-charts-pro-user-defined-indicators/initialisation-udi.oninit/2.2-the-plots-array","siteSpaceId":"sitesp_ygj3Z","breadcrumbs":[{"label":"Sway Charts Pro User-Defined Indicators"},{"label":"Initialisation: UDI.onInit()"}]},{"id":"cGxgSAGRvUneCZubOJjh","title":"2.3\tThe settingsFields[] array","pathname":"/sway-charts-pro-scripts-documentation/sway-charts-pro-user-defined-indicators/initialisation-udi.oninit/2.3-the-settingsfields-array","siteSpaceId":"sitesp_ygj3Z","breadcrumbs":[{"label":"Sway Charts Pro User-Defined Indicators"},{"label":"Initialisation: UDI.onInit()"}]},{"id":"H2Mjn4uLirGlhJgPCYXM","title":"2.4\tContext data passed to UDI.onInit()","pathname":"/sway-charts-pro-scripts-documentation/sway-charts-pro-user-defined-indicators/initialisation-udi.oninit/2.4-context-data-passed-to-udi.oninit","siteSpaceId":"sitesp_ygj3Z","breadcrumbs":[{"label":"Sway Charts Pro User-Defined Indicators"},{"label":"Initialisation: UDI.onInit()"}]},{"id":"lb3bSBy44pccsyDILobL","title":"Calculating data: UDI.onCalculate()","pathname":"/sway-charts-pro-scripts-documentation/sway-charts-pro-user-defined-indicators/calculating-data-udi.oncalculate","siteSpaceId":"sitesp_ygj3Z","breadcrumbs":[{"label":"Sway Charts Pro User-Defined Indicators"}]},{"id":"aoZ25hi88Md6JrclEZXl","title":"3.1\tReading settings fields","pathname":"/sway-charts-pro-scripts-documentation/sway-charts-pro-user-defined-indicators/calculating-data-udi.oncalculate/3.1-reading-settings-fields","siteSpaceId":"sitesp_ygj3Z","breadcrumbs":[{"label":"Sway Charts Pro User-Defined Indicators"},{"label":"Calculating data: UDI.onCalculate()"}]},{"id":"8OvfwXy7EQRpL4rfLwKM","title":"3.2\tInput data for the UDI","pathname":"/sway-charts-pro-scripts-documentation/sway-charts-pro-user-defined-indicators/calculating-data-udi.oncalculate/3.2-input-data-for-the-udi","siteSpaceId":"sitesp_ygj3Z","breadcrumbs":[{"label":"Sway Charts Pro User-Defined Indicators"},{"label":"Calculating data: UDI.onCalculate()"}]},{"id":"NWoN1KsGu3sdH4NvceKP","title":"3.3\tUpdates of the current bar only","pathname":"/sway-charts-pro-scripts-documentation/sway-charts-pro-user-defined-indicators/calculating-data-udi.oncalculate/3.3-updates-of-the-current-bar-only","siteSpaceId":"sitesp_ygj3Z","breadcrumbs":[{"label":"Sway Charts Pro User-Defined Indicators"},{"label":"Calculating data: UDI.onCalculate()"}]},{"id":"ZfnZEBLCrNWxOldE1sWP","title":"3.4\tCalculating output data","pathname":"/sway-charts-pro-scripts-documentation/sway-charts-pro-user-defined-indicators/calculating-data-udi.oncalculate/3.4-calculating-output-data","siteSpaceId":"sitesp_ygj3Z","breadcrumbs":[{"label":"Sway Charts Pro User-Defined Indicators"},{"label":"Calculating data: UDI.onCalculate()"}]},{"id":"IwsniipmxvZYtgOfimLT","title":"3.5\tRequesting out-of-band updates","pathname":"/sway-charts-pro-scripts-documentation/sway-charts-pro-user-defined-indicators/calculating-data-udi.oncalculate/3.5-requesting-out-of-band-updates","siteSpaceId":"sitesp_ygj3Z","breadcrumbs":[{"label":"Sway Charts Pro User-Defined Indicators"},{"label":"Calculating data: UDI.onCalculate()"}]},{"id":"HKZuhosGCB0nFsWio2lK","title":"3.6\tTechnical analysis: moving averages, ATR etc","pathname":"/sway-charts-pro-scripts-documentation/sway-charts-pro-user-defined-indicators/calculating-data-udi.oncalculate/3.6-technical-analysis-moving-averages-atr-etc","siteSpaceId":"sitesp_ygj3Z","breadcrumbs":[{"label":"Sway Charts Pro User-Defined Indicators"},{"label":"Calculating data: UDI.onCalculate()"}]},{"id":"ptIKAurnX3micYZ6vDt0","title":"Changes to the chart or parameters","pathname":"/sway-charts-pro-scripts-documentation/sway-charts-pro-user-defined-indicators/changes-to-the-chart-or-parameters","siteSpaceId":"sitesp_ygj3Z","breadcrumbs":[{"label":"Sway Charts Pro User-Defined Indicators"}]},{"id":"I8Mi5d0vO19JesUkrPth","title":"4.1 UDI.onContextChange()","pathname":"/sway-charts-pro-scripts-documentation/sway-charts-pro-user-defined-indicators/changes-to-the-chart-or-parameters/4.1-udi.oncontextchange","siteSpaceId":"sitesp_ygj3Z","breadcrumbs":[{"label":"Sway Charts Pro User-Defined Indicators"},{"label":"Changes to the chart or parameters"}]},{"id":"4VAdszAPiWIfC8gHa8nm","title":"4.2\tUDI.onParameterChange()","pathname":"/sway-charts-pro-scripts-documentation/sway-charts-pro-user-defined-indicators/changes-to-the-chart-or-parameters/4.2-udi.onparameterchange","siteSpaceId":"sitesp_ygj3Z","breadcrumbs":[{"label":"Sway Charts Pro User-Defined Indicators"},{"label":"Changes to the chart or parameters"}]},{"id":"aDauwTMOwKCvWLRO3Hge","title":"Creating drawings, event markers, and bar highlights","pathname":"/sway-charts-pro-scripts-documentation/sway-charts-pro-user-defined-indicators/creating-drawings-event-markers-and-bar-highlights","siteSpaceId":"sitesp_ygj3Z","breadcrumbs":[{"label":"Sway Charts Pro User-Defined Indicators"}]},{"id":"K8mVDPLLVc31KBUGOAwA","title":"5.1\tCreating drawings","pathname":"/sway-charts-pro-scripts-documentation/sway-charts-pro-user-defined-indicators/creating-drawings-event-markers-and-bar-highlights/5.1-creating-drawings","siteSpaceId":"sitesp_ygj3Z","breadcrumbs":[{"label":"Sway Charts Pro User-Defined Indicators"},{"label":"Creating drawings, event markers, and bar highlights"}]},{"id":"JgIrtS7yVtxJVds7XLSs","title":"5.1.1 Drawing properties","pathname":"/sway-charts-pro-scripts-documentation/sway-charts-pro-user-defined-indicators/creating-drawings-event-markers-and-bar-highlights/5.1.1-drawing-properties","siteSpaceId":"sitesp_ygj3Z","breadcrumbs":[{"label":"Sway Charts Pro User-Defined Indicators"},{"label":"Creating drawings, event markers, and bar highlights"}]},{"id":"3I7fc6L7dICMcILYR0dX","title":"5.2\tCreating event markers","pathname":"/sway-charts-pro-scripts-documentation/sway-charts-pro-user-defined-indicators/creating-drawings-event-markers-and-bar-highlights/5.2-creating-event-markers","siteSpaceId":"sitesp_ygj3Z","breadcrumbs":[{"label":"Sway Charts Pro User-Defined Indicators"},{"label":"Creating drawings, event markers, and bar highlights"}]},{"id":"DaS3dhybxaotH7d9cQPu","title":"5.2.1\tClick notifications from event markers","pathname":"/sway-charts-pro-scripts-documentation/sway-charts-pro-user-defined-indicators/creating-drawings-event-markers-and-bar-highlights/5.2.1-click-notifications-from-event-markers","siteSpaceId":"sitesp_ygj3Z","breadcrumbs":[{"label":"Sway Charts Pro User-Defined Indicators"},{"label":"Creating drawings, event markers, and bar highlights"}]},{"id":"dg9RR9sz99W4KE9wDPCR","title":"5.3\tCreating bar highlights","pathname":"/sway-charts-pro-scripts-documentation/sway-charts-pro-user-defined-indicators/creating-drawings-event-markers-and-bar-highlights/5.3-creating-bar-highlights","siteSpaceId":"sitesp_ygj3Z","breadcrumbs":[{"label":"Sway Charts Pro User-Defined Indicators"},{"label":"Creating drawings, event markers, and bar highlights"}]},{"id":"GTPoXrONDA9AdLFNY7BY","title":"Notifying the user","pathname":"/sway-charts-pro-scripts-documentation/sway-charts-pro-user-defined-indicators/notifying-the-user","siteSpaceId":"sitesp_ygj3Z","breadcrumbs":[{"label":"Sway Charts Pro User-Defined Indicators"}]},{"id":"UjfuyFS92vpIJPM5VYeI","title":"6.1\tCreating toast","pathname":"/sway-charts-pro-scripts-documentation/sway-charts-pro-user-defined-indicators/notifying-the-user/6.1-creating-toast","siteSpaceId":"sitesp_ygj3Z","breadcrumbs":[{"label":"Sway Charts Pro User-Defined Indicators"},{"label":"Notifying the user"}]},{"id":"szq1VjgMxWyKIYCUhGrA","title":"6.2\tChanging the panel background colour","pathname":"/sway-charts-pro-scripts-documentation/sway-charts-pro-user-defined-indicators/notifying-the-user/6.2-changing-the-panel-background-colour","siteSpaceId":"sitesp_ygj3Z","breadcrumbs":[{"label":"Sway Charts Pro User-Defined Indicators"},{"label":"Notifying the user"}]},{"id":"schbNp0lATpNrJt0Ouz7","title":"Adding HTML to the chart","pathname":"/sway-charts-pro-scripts-documentation/sway-charts-pro-user-defined-indicators/adding-html-to-the-chart","siteSpaceId":"sitesp_ygj3Z","breadcrumbs":[{"label":"Sway Charts Pro User-Defined Indicators"}]},{"id":"qpvA7Lp4W2d2QVVVg5q8","title":"7.1\tAdding HTML","pathname":"/sway-charts-pro-scripts-documentation/sway-charts-pro-user-defined-indicators/adding-html-to-the-chart/7.1-adding-html","siteSpaceId":"sitesp_ygj3Z","breadcrumbs":[{"label":"Sway Charts Pro User-Defined Indicators"},{"label":"Adding HTML to the chart"}]},{"id":"LChWW09uGEfyYsfRwYCC","title":"7.2 Positioning the HTML","pathname":"/sway-charts-pro-scripts-documentation/sway-charts-pro-user-defined-indicators/adding-html-to-the-chart/7.2-positioning-the-html","siteSpaceId":"sitesp_ygj3Z","breadcrumbs":[{"label":"Sway Charts Pro User-Defined Indicators"},{"label":"Adding HTML to the chart"}]},{"id":"WuEznEMdLgI2l2NkB6pC","title":"7.3\tSending messages from the HTML to the UDI","pathname":"/sway-charts-pro-scripts-documentation/sway-charts-pro-user-defined-indicators/adding-html-to-the-chart/7.3-sending-messages-from-the-html-to-the-udi","siteSpaceId":"sitesp_ygj3Z","breadcrumbs":[{"label":"Sway Charts Pro User-Defined Indicators"},{"label":"Adding HTML to the chart"}]},{"id":"3DCHcylPxEUafynxI6vT","title":"7.4\tSending messages from the UDI to the HTML","pathname":"/sway-charts-pro-scripts-documentation/sway-charts-pro-user-defined-indicators/adding-html-to-the-chart/7.4-sending-messages-from-the-udi-to-the-html","siteSpaceId":"sitesp_ygj3Z","breadcrumbs":[{"label":"Sway Charts Pro User-Defined Indicators"},{"label":"Adding HTML to the chart"}]},{"id":"50q2wBNFvbRlkN1aMQbs","title":"Recommended trade","pathname":"/sway-charts-pro-scripts-documentation/sway-charts-pro-user-defined-indicators/recommended-trade","siteSpaceId":"sitesp_ygj3Z","breadcrumbs":[{"label":"Sway Charts Pro User-Defined Indicators"}]},{"id":"6Uu9xEs3vcbOn4wKcvTd","title":"8.0 Recommended trade","pathname":"/sway-charts-pro-scripts-documentation/sway-charts-pro-user-defined-indicators/recommended-trade/8.0-recommended-trade","siteSpaceId":"sitesp_ygj3Z","breadcrumbs":[{"label":"Sway Charts Pro User-Defined Indicators"},{"label":"Recommended trade"}]},{"id":"IvCplfvaiTtuKHp8qSsG","title":"Other indicator topics","pathname":"/sway-charts-pro-scripts-documentation/sway-charts-pro-user-defined-indicators/other-indicator-topics","siteSpaceId":"sitesp_ygj3Z","breadcrumbs":[{"label":"Sway Charts Pro User-Defined Indicators"}]},{"id":"LMcw5mcEqXB4IaURCIfd","title":"9.1\tCollecting external data","pathname":"/sway-charts-pro-scripts-documentation/sway-charts-pro-user-defined-indicators/other-indicator-topics/9.1-collecting-external-data","siteSpaceId":"sitesp_ygj3Z","breadcrumbs":[{"label":"Sway Charts Pro User-Defined Indicators"},{"label":"Other indicator topics"}]},{"id":"s1yAZeFiOB1lfHoZMRiC","title":"9.2\tConverting dates to chart time","pathname":"/sway-charts-pro-scripts-documentation/sway-charts-pro-user-defined-indicators/other-indicator-topics/9.2-converting-dates-to-chart-time","siteSpaceId":"sitesp_ygj3Z","breadcrumbs":[{"label":"Sway Charts Pro User-Defined Indicators"},{"label":"Other indicator topics"}]},{"id":"uOjVTmsMsesJOAKAj83Z","title":"9.3\tMulti-timeframe (MTF) indicators","pathname":"/sway-charts-pro-scripts-documentation/sway-charts-pro-user-defined-indicators/other-indicator-topics/9.3-multi-timeframe-mtf-indicators","siteSpaceId":"sitesp_ygj3Z","breadcrumbs":[{"label":"Sway Charts Pro User-Defined Indicators"},{"label":"Other indicator topics"}]},{"id":"Ze2jFbhZ2ej3wqPQALbY","title":"Sway Charts Pro Framework","pathname":"/sway-charts-pro-scripts-documentation/sway-charts-pro-framework","siteSpaceId":"sitesp_ygj3Z"},{"id":"g7inZxg8cY43ePJp9zGa","title":"Examples","pathname":"/sway-charts-pro-scripts-documentation/sway-charts-pro-framework/examples","siteSpaceId":"sitesp_ygj3Z","breadcrumbs":[{"label":"Sway Charts Pro Framework"}]},{"id":"WFo9HDf7cBztMAZRvw68","title":"Collections, objects, and properties in the framework","pathname":"/sway-charts-pro-scripts-documentation/sway-charts-pro-framework/collections-objects-and-properties-in-the-framework","siteSpaceId":"sitesp_ygj3Z","breadcrumbs":[{"label":"Sway Charts Pro Framework"}]},{"id":"jX4e4chgNT2xcEzzSSC3","title":"Functions in the framework","pathname":"/sway-charts-pro-scripts-documentation/sway-charts-pro-framework/functions-in-the-framework","siteSpaceId":"sitesp_ygj3Z","breadcrumbs":[{"label":"Sway Charts Pro Framework"}]},{"id":"V4z0FVLrDFyOGCCJ1b9L","title":"Messages and event handlers","pathname":"/sway-charts-pro-scripts-documentation/sway-charts-pro-framework/messages-and-event-handlers","siteSpaceId":"sitesp_ygj3Z","breadcrumbs":[{"label":"Sway Charts Pro Framework"}]},{"id":"Xq0DIY5LfQqigre6KMS8","title":"Working with candle data","pathname":"/sway-charts-pro-scripts-documentation/sway-charts-pro-framework/working-with-candle-data","siteSpaceId":"sitesp_ygj3Z","breadcrumbs":[{"label":"Sway Charts Pro Framework"}]},{"id":"nXz2oh76Jf7waa12Lz33","title":"Widget HTML and CSS reference","pathname":"/sway-charts-pro-scripts-documentation/sway-charts-pro-framework/widget-html-and-css-reference","siteSpaceId":"sitesp_ygj3Z","breadcrumbs":[{"label":"Sway Charts Pro Framework"}]},{"id":"Y0OP2oMTK3Gyt5TinBEo","title":"Sway.utils and other helper functions","pathname":"/sway-charts-pro-scripts-documentation/sway-charts-pro-framework/sway.utils-and-other-helper-functions","siteSpaceId":"sitesp_ygj3Z","breadcrumbs":[{"label":"Sway Charts Pro Framework"}]},{"id":"wutEYC6dQnsOyGOlKmOJ","title":"Framework error codes","pathname":"/sway-charts-pro-scripts-documentation/sway-charts-pro-framework/framework-error-codes","siteSpaceId":"sitesp_ygj3Z","breadcrumbs":[{"label":"Sway Charts Pro Framework"}]},{"id":"Aj6wzNgPhPi8BJDUmXmJ","title":"Script contexts","pathname":"/sway-charts-pro-scripts-documentation/sway-charts-pro-framework/script-contexts","siteSpaceId":"sitesp_ygj3Z","breadcrumbs":[{"label":"Sway Charts Pro Framework"}]},{"id":"FmLtMGQRVqAksUaD8Xxe","title":"Sending mail into Sway Charts Pro from outside the platform","pathname":"/sway-charts-pro-scripts-documentation/sway-charts-pro-framework/sending-mail-into-sway-charts-pro-from-outside-the-platform","siteSpaceId":"sitesp_ygj3Z","breadcrumbs":[{"label":"Sway Charts Pro Framework"}]},{"id":"AyTCv9hXAA8GUXdy8meU","title":"language variables","pathname":"/sway-charts-pro-scripts-documentation/sway-charts-pro-framework/language-variables","siteSpaceId":"sitesp_ygj3Z","breadcrumbs":[{"label":"Sway Charts Pro Framework"}]}]}