scichart by Kline

<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:ThemeManager.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();
}
}
}

scichart by Kline,布布扣,bubuko.com

时间: 2024-10-14 18:33:34

scichart by Kline的相关文章

Mercedes Smart Key Teach-in support k-line Smart (1998-2002)

Disclaimer: Smart Key Teach-in only supports Mercedes-Benz Smart (1998~2002) with K-line protocol. Smart Key Teach-in support ECU type as follows:  MB - Smart vehicles dongle key programmer SMART Teach-in is required when keys are lost, damaged or if

MB Star C3 DAS Fault (1.1)-1.501.9504 (Solved)

I have had a Mercedes diagnostic machine MB STAR C3 for a while and i decided to try and make it work, but every time i try to communicate with the car i get  an error message saying : Fault (1.1)-1.501.9504Initialization of diagnosis multiplexer fai

【开源】专业K线绘制[K线主副图、趋势图、成交量、滚动、放大缩小、MACD、KDJ等)

这是最近一个iOS项目需要使用的K线的绘制,在网上大量查阅资料无果,只好自行绘制. 实时数据使用来源API: https://www.btc123.com/kline/klineapi 返回数据说明: 1.时间戳 2.开盘价 3.最高价 4.最低价 5.收盘价 6.成交量 实现功能包括K线主副图.趋势图.成交量.滚动.放大缩小.MACD.KDJ,长按显示辅助线等功能 预览图 最后的最后,这是项目的开源地址:https://github.com/yate1996/Y_KLine,如果帮到了你,麻烦

RANSAC

RANSAC是"RANdom SAmple Consensus(随机抽样一致)"的缩写.它可以从一组包含"局外点"的观测数据集中,通过迭代方式估计数学模型的参数.它是一种不确定的算法--它有一定的概率得出一个合理的结果:为了提高概率必须提高迭代次数.该算法最早由Fischler和Bolles于1981年提出.核心思想就是随机性和假设性,随机性用于减少计算,循环次数是利用正确数据出现的概率.所谓的假设性,就是说随机抽出来的数据都认为是正确的,并以此去计算其他点,获得其

一些对数学领域及数学研究的个人看法(转载自博士论坛wcboy)

转自:http://www.math.org.cn/forum.php?mod=viewthread&tid=14819&extra=&page=1 原作者: wcboy 现在的论坛质量比以前差了,大部分都是来解题问答的,而且层次较低.以前论坛中,Qullien很令人印象深刻,但愿他能在国外闯出一片天空.现在 基础数学版代数&数论子版中那几个讨论代数几何的还不错.不期望目前论坛出现很多高层次高手,高层次高手应该站在好课题上高观点讨论数学,出 现这样的网友,看他们的言论非常过

股票K线图-JfreeChart版

http://blog.csdn.net/ami121/article/details/3953272 股票K线图-JfreeChart版 标签: jfreechartpropertiesappletdatetabledataset 2009-03-03 16:00 9378人阅读 评论(8) 收藏 举报 分类: jfreechart(7) 股票的K线图是所有Chart图中最复杂的一种,把一个K线图拆分开来我们可以发现,K线图的上半截实际上是由阴阳线(阴阳线可以表示开盘价,收盘价,最高价,最低价

黑马程序员-----封装的概念及原理

------<a href="http://www.itheima.com" target="blank">Java培训.Android培训.iOS培训..Net培训</a>.期待与您交流! ----- 第一讲   封装的概念及原理 本小节知识点: 1.[了解]为什么要进行封装 2.[了解]封装的原理 1.为什么要进行封装 不封装的缺点: 当一个类把自己的属性暴露给外部的时候,那么该类就是去对属性的管理权. 将数据隐藏起来,只能用此类的方法函

AC日记——[HNOI2008]水平可见直线 bzoj 1007

1007 思路: 维护一个下凸壳: 用单调栈来维护这玩意儿: 先将斜率排序: 然后判断栈顶元素和当前元素的交点x是否小于栈顶元素和栈顶上一个元素的交点x: 注意: 人神共愤的精度问题和输出空格问题: 来,上代码: #include <cmath> #include <cstdio> #include <cstring> #include <iostream> #include <algorithm> using namespace std; #d

总会有一个是你需要的

http://www.shouce.ren/post/d/id/112300 黑客攻防实战入门与提高.pdfhttp://www.shouce.ren/post/d/id/112299 黑客入门新手特训.pdfhttp://www.shouce.ren/post/d/id/112298 黑客与设计-剖析设计之美的秘密(彩印).pdfhttp://www.shouce.ren/post/d/id/112297 鸟哥的LINUX私房菜:服务器架设篇 (第二版).pdfhttp://www.shouc