|
- //------------------------------------------------------------------------
- // 简称:MACDBS
- // 名称:MACD变色
- // 类别: 交易指令
- // 类型: 用户应用
- //------------------------------------------------------------------------
- Params
- //参数定义
- Integer shortLength(12);
- Integer longLength(26);
- GlobalVars
- //全局变量定义
- Vars
- //局部变量定义
- Begin
- //策略执行区
-
- NumericArray m15Close = HisData(Enum_Data_Close, Enum_Period_Min, 15);
- Numeric m15Diff = iEMA(m15Close, shortLength) - iEMA(m15Close, longLength);
-
- NumericArray dclose = HisData(Enum_Data_Close, Enum_Period_Day, 1);
- Numeric dDiff = iEMA(dclose, shortLength) - iEMA(dclose, longLength);
-
- if(m15Diff > 0 and dDiff>0){
- ColorBar(ColorUp);
- }else{
- ColorBar(ColorDown);
- }
-
-
-
- End
复制代码 |
|