<Usercontrol X: class = "abt. controls. scichart. example. examples. iwantto. createmultiserieschart. candlestickwithlinesview "xmlns =" http://schemas.microsoft.com/winfx/2006/xaml/presentation "xmlns: x =" http://schemas.microsoft.com/winfx/2006/xaml "xmlns: D =" http://schemas.microsoft.com/expression/blend/2008 "xmlns: MC =" http://schemas.openxmlformats.org/markup-compatibility/2006 "xmlns: S =" http://schemas.abtsoftware.co.uk/scichart "D: designheight = "300" D: designwidth = "300" loaded = "candlestickswithlines_loaded" MC: ignorable = "D">
<S: scichartsurface X: Name = "scichart" s: themanager. theme = "Chrome">
<S: scichartsurface. renderableseries>
<! -- Candlestick bodies now support gradients as well as solid colours -->
<S: fastcandlestickrenderableseries>
<S: fastcandlestickrenderableseries. upbodybrush>
<Lineargradientbrush startpoint = "0, 0" endpoint = "0, 1
<Gradientstop offset = "0" color = "#55002200"/>
<Gradientstop offset = "1" color = "# ff00aa00"/>
</Lineargradientbrush>
</S: fastcandlestickrenderableseries. upbodybrush>
<S: fastcandlestickrenderableseries. downbodybrush>
<Lineargradientbrush startpoint = "0, 0" endpoint = "0, 1">
<Gradientstop offset = "0" color = "#55441111"/>
<Gradientstop offset = "1" color = "# ffff0000"/>
</Lineargradientbrush>
</S: fastcandlestickrenderableseries. downbodybrush>
</S: fastcandlestickrenderableseries>
<S: fastlinerenderableseries seriescolor = "# ff1919"/>
<S: fastlinerenderableseries seriescolor = "# 1964ff"/>
<S: fastlinerenderableseries seriescolor = "# ff9b27"/>
</S: scichartsurface. renderableseries>
<S: scichartsurface. xaxis>
<S: categorydatetimeaxis growby = "0.0, 0.2"/>
</S: scichartsurface. xaxis>
<S: scichartsurface. yaxis>
<S: numericaxis growby = "0.1, 0.1"/>
</S: scichartsurface. yaxis>
<S: scichartsurface. chartmodifier>
<S: modifiergroup X: Name = "_ groupmodifier">
<S: zoompanmodifier xydirection = "xdirection"/>
<S: zoomextentsmodifier executeon = "mousedoubleclick"/>
</S: modifiergroup>
</S: scichartsurface. chartmodifier>
</S: scichartsurface>
</Usercontrol>
______
Using system;
Using system. windows;
Using system. Windows. controls;
Using ABT. Controls. scichart. example. Common;
Using ABT. Controls. scichart. example. Data;
Using ABT. Controls. scichart. model. dataseries;
Namespace abt. Controls. scichart. example. Examples. Iwantto. createmultiserieschart
{
Public partial class candlestickwithlinesview: usercontrol
{
Public candlestickwithlinesview ()
{
Initializecomponent ();
}
Private void candlestickswithlines_loaded (Object sender, routedeventargs E)
{
// Create multiple dataseries to store ohlc candlestick data, and XY moving average data
VaR dataseries0 = new ohlcdataseries <datetime, double> ();
VaR dataseries1 = new xydataseries <datetime, double> ();
VaR dataseries2 = new xydataseries <datetime, double> ();
VaR dataseries3 = new xydataseries <datetime, double> ();
// Prices are in the format time, open, high, low, close (all ilist)
VaR prices = datamanager. instance. getpricedata (instrument. Indu. Value, timeframe. Daily );
// Append data to series.
// First series is rendered as a candlestick chart so We append ohlc data
Dataseries0.append (prices. timedata, prices. opendata, prices. highdata, prices. lowdata, prices. closedata );
// Subsequent series append moving average of the close prices
Dataseries1.append (prices. timedata, datamanager. instance. computemovingaverage (prices. closedata, 100 ));
Dataseries2.append (prices. timedata, datamanager. instance. computemovingaverage (prices. closedata, 50 ));
Dataseries3.append (prices. timedata, datamanager. instance. computemovingaverage (prices. closedata, 20 ));
Scichart. renderableseries [0]. dataseries = dataseries0;
Scichart. renderableseries [1]. dataseries = dataseries1;
Scichart. renderableseries [2]. dataseries = dataseries2;
Scichart. renderableseries [3]. dataseries = dataseries3;
Scichart. zoomextents ();
}
}
}