Sway Charts Pro Framework

You can use the Sway Charts Pro framework to build trading algos, indicators for charts, and whole new tools within the Sway Charts Pro platform.

The Sway Charts Pro framework provides three types of software development:

· Widgets. All the built-in tools in Sway Charts Pro – charts, quote board, trade list etc – are widgets, and any widgets which you create have access to all the same features as built-in widgets.

· Scripts. You can create and save scripts using the Run Script widget in Sway Charts Pro. Scripts can be given icons in the platform's banner, and can be set to start automatically when the platform is loaded. (Scripts can also be given a context, so that they are available in specific places within the Sway Charts Pro platform.)

· User-defined indicators, for charts.

User-defined indicators subdivide into two types:

· Standard indicators (UDI), which only have access to the chart on which they run.

· Enhanced indicators (UDIX) which also have access to the Sway Charts Pro framework described here. They can see data such as the trade list, and they can carry out actions such as placing trades.

Creating indicators is described elsewhere, at https://www.fxblue.com/Sway Charts Pro/udi/help. A UDIX is simply an indicator which also has a Framework object, in addition to the indicator features which are described separately. You choose whether to give a UDI access to the Framework, turning it into a UDIX, when you add it to a chart.

In terms of the web browser:

· Widgets are iframes (sandboxed). A widget is simply an HTML document which integrates with Sway Charts Pro by including the framework script and CSS.

· Scripts and UDIXes are web workers. They have no user interface of their own, but they can create dialogs and interact with the platform.

Sway Charts Pro is a web-based platform, and therefore the programming language for creating widgets, scripts, and UDIXes is simply Javascript. You can also write your code in any language such as TypeScript or CoffeeScript which compiles to Javascript.

You can use any development environment, from Notepad to Visual Studio or Eclipse. You can paste HTML/Javascript into the Run Script and External Widget windows in Sway Charts Pro. You don't have to write your code inside the Sway Charts Pro platform.

Note: in addition to the facilities described here for extending the Sway Charts Pro platform, it is also possible to use the Excel RTD widget to write code outside the Sway Charts Pro platform, in any language of your choice such as Node.js, C#, or Python, communicating with the web browser using HTTP or websockets. It is even possible to download data directly into Excel without any programming. For more information, see the document about the Excel RTD widget:

https://www.fxblue.com/Sway Charts Pro/excel-rtd/help

Last updated