// 指标配置
dsxConfig.index = {
VOL:{
// 显示名称
title:"成交量",
// 参数配置值
value:{VOL:0,MA5:5,MA10:10},
// 画线配置
draw:{VOL:{model:"column",color:"CLOSE",hiddenTitle:true},MA5:{model:"line",color:"#FFA500"},MA10:{model:"line",color:"#87CEFA"}},
// 支持的图形
chartType:[dsxConfig.chartType.timeSharing,dsxConfig.chartType.timeSharing5,dsxConfig.chartType.candle],
// 支持的图表位置 主图 main,副图 sides
location:['sides']
},
TMA:{
title:"",
value:{"均价":1},
draw:{ "均价":{model:"line",color:"#FFA500"},"新值":{model:"text",color:"",colorValue:0}},
chartType:[dsxConfig.chartType.timeSharing,dsxConfig.chartType.timeSharing5],
location:['main']
},
MA:{
title:"均线",
value:{ MA5:5, MA10:10, MA30:30,MA60:60},
draw:{ MA5:{model:"line",color:"#FFA500"}, MA10:{model:"line",color:"#87CEFA"}, MA30:{model:"line",color:"#BA55D3"},MA60:{model:"line",color:"#808000"},},
chartType:[dsxConfig.chartType.timeSharing,dsxConfig.chartType.timeSharing5,dsxConfig.chartType.candle],
location:['main']
},
MACD:{
title:"MACD(26,9,12)",
value:{DIFF:0,DEA:0,MACD:0,long:26,d:9,short:12},
draw:{DIFF:{model:"line",color:"#FFA500"},DEA:{model:"line",color:"#87CEFA"}, MACD:{model:"column",color:"#BA55D3"}},
chartType:[dsxConfig.chartType.timeSharing,dsxConfig.chartType.timeSharing5,dsxConfig.chartType.candle],
location:['sides']
},
KDJ:{
title:"KDJ(9,3,3)",
value:{K:9,D:3,J:3},
draw:{K:{model:"line",color:"#FFA500"},D:{model:"line",color:"#87CEFA"},J:{model:"line",color:"#BA55D3"}},
chartType:[dsxConfig.chartType.candle],
location:['sides']
},
BOLL:{
title:"BOLL(20,2)",
value:{UP:0,MID:0,LOW:0,N:20,M:2},
draw:{UP:{model:"line",color:"#FFA500"},MID:{model:"line",color:"#87CEFA"}, LOW:{model:"line",color:"#BA55D3"}},
chartType:[dsxConfig.chartType.candle],
location:['main']
},
RSI:{
title:"RSI(6,12,24)",
value:{RSI6:6,RSI12:12,RSI24:24},
draw:{RSI6:{model:"line",color:"#FFA500"},RSI12:{model:"line",color:"#87CEFA"}, RSI24:{model:"line",color:"#BA55D3"}},
chartType:[dsxConfig.chartType.timeSharing,dsxConfig.chartType.timeSharing5,dsxConfig.chartType.candle],
location:['sides']
},
WR:{
title:"WR(6,10)",
value:{WR6:6,WR10:10},
draw:{WR6:{model:"line",color:"#FFA500"},WR10:{model:"line",color:"#87CEFA"}},
chartType:[dsxConfig.chartType.candle],
location:['sides']
},
BIAS:{
title:"BIAS(6,12,24)",
value:{BIAS6:6,BIAS12:12,BIAS24:24},
draw:{BIAS6:{model:"line",color:"#FFA500"},BIAS12:{model:"line",color:"#87CEFA"}, BIAS24:{model:"line",color:"#BA55D3"}},
chartType:[dsxConfig.chartType.candle],
location:['sides']
},
CCI:{
title:"CCI(14)",
value:{CCI14:14},
draw:{CCI14:{model:"line",color:"#FFA500"}},
chartType:[dsxConfig.chartType.candle],
location:['sides']
},
PSY:{
title:"PSY(12,6)",
value:{PSY:12,PSYMA:6},
draw:{PSY:{model:"line",color:"#FFA500"},PSYMA:{model:"line",color:"#87CEFA"}},
chartType:[dsxConfig.chartType.candle],
location:['sides']
},
SAR:{
title:"SAR(4,2,20)",
value:{N:4,S:2,M:20,SAR:"SAR"},
draw:{SAR:{model:"cycle",color:"#4CAF50",highcolor:"#F44336"}},
chartType:[dsxConfig.chartType.candle],
location:['main']
},
}
// 主题配置
dsxConfig.theme = {
white:{
backgroundColor:"#ffffff", // 背景颜色
color:"#333333",// 字体颜色
fontSize:window.devicePixelRatio<=1?12:10,// 字体大小
redColor:"#F44336",// 蜡烛图红色
greenColor:"#4CAF50",// 蜡烛图绿色
crossLineColor:"#2196F3",// 十字线颜色
crossLineWidth:1.0,// 十字线宽度
fontBgColor:"#2196F3", // 文字背景颜色 十字线提示的文字背景颜色
gridLineColor:"#eeeeee",// 网格线颜色
gridLineCount:3,// 网格线数量
gridLineWidth:1.0,// 网格线的宽度
lineWidth:1.0, // 线条的大小 指标线条的大小
klineWidth:10,// 一根k线的默认宽度
klinePadding:1,// k线之间的间隔
timeSharingLineColor:"#2196F3",// 分时图价格线的颜色
timeSharingLineFillColor:"rgba(65,105,225,0.1)", // 分时图价格线区域填充颜色
},
dark:{
backgroundColor:"rgba(19, 23, 34, 1)", // 背景颜色
color:"#c5cbce",// 字体颜色
fontSize:window.devicePixelRatio<=1?12:10,// 字体大小
redColor:"#F44336",// 蜡烛图红色
greenColor:"#4CAF50",// 蜡烛图绿色
crossLineColor:"#2196F3",// 十字线颜色
crossLineWidth:1.0,// 十字线宽度
fontBgColor:"#2196F3", // 文字背景颜色
gridLineColor:"#191b28",// 网格线颜色
gridLineCount:3,// 网格线数量
gridLineWidth:1.0,// 网格线的宽度
lineWidth:1.0, // 线条的大小 指标线条的大小
klineWidth:10,// 一根k线的默认宽度
klinePadding:1,// k线之间的间隔
timeSharingLineColor:"#2196F3",// 分时图价格线的颜色
timeSharingLineFillColor:"rgba(65,105,225,0.1)", // 分时图价格线区域填充颜色
}
}