分析家公式网,提供指标公式,股票软件 用户登录  |  用户 注册

软件名称:[B]超级策略原始版(易盛软件指标源码)[/B]
软件类型:国产软件
运行环境:Win9X/Win2000/WinXP/Win2003/Win7/
软件语言:简体中文
授权方式:免费版
软件大小:0 Bytes
官方主页:Home Page
更新时间:2010-06-16 10:02:16
软件简介:

 //------------------------------------------------------------------------

// 简称:超级策略原始版
// 名称:超级策略原始版
// 类别: 交易指令
// 类型: 用户应用
// 说明:私人代码
//------------------------------------------------------------------------
Params 
//参数定义
Integer Period(5); //  定义周期
Numeric amp_ratio(1.5); //  定义系数
// Integer DebugLevel(1); // 显示信息的层级,0:不显示任何信息 1:显示Super指标,2:?
 
GlobalVars
//全局变量定义
NumericSeries v_super;
NumericSeries trend_dir; // 标志
NumericSeries amp_res_high;
NumericSeries amp_res_low;
NumericSeries hiest;
NumericSeries loest;
NumericSeries max_amp_short;
NumericSeries max_amp_long;
NumericSeries v_super_low;
NumericSeries v_super_high;
 
Vars
//局部变量定义
Numeric close_line(0);
Numeric chan_low(0);
Numeric chan_high(0);
Numeric v_mid_h_l(0); // 中线
Numeric max_amp(0);
Numeric cur_close_ema_2(0);
NumericArray his_min10;
Numeric  long_short_ratio(0);
Numeric  period_highest(0);
Numeric  period_lowest(0);
 
Begin
// ************************
//   K线的价咯通道计算   *
// ************************
// 取10分钟收盘价,100组。
his_min10 = HisData(Enum_Data_Close,Enum_Period_Min, 10, "", 100);  
// 从前一根算起的,获得向前的两组价咯的EMA,实际上就是最近20分钟收盘价的均值。
cur_close_ema_2 = iEMA(his_min10, 2, 1);
// PlotNumeric("cur_close_ema_2", cur_close_ema_2);
// 计算价咯通道的上下限值
close_line = (0.5*cur_close_ema_2 + 1.5*Close[1])/2;
// PlotNumeric("close_line", close_line);
chan_low = (2*Low + Max(cur_close_ema_2, close_line))/3;
chan_high = (2*High + Min(cur_close_ema_2, close_line))/3;
 
// PlotNumeric("chan_low", chan_low);
// PlotNumeric("chan_high", chan_high);
// ************************
//   走势的阻力通道计算   *
// ************************
// 计算当前波动的最大幅度
max_amp = Max(Max(Abs(Close[1] - Low), Abs(Close[1] - High)), (High-Low));
// 计算最大波动幅度的长短期均值
max_amp_short = MA(max_amp, 10);
max_amp_long = MA(max_amp, 20);
// 计算周期
long_short_ratio = Round(max_amp_long[1]/max_amp_short[1]*amp_ratio, 0); // 前收盘对应的长短周期波动幅度比
period_highest = IntPart(Period*(max_amp_long[0]/max_amp_short[0]));
period_lowest = IntPart(Period*(max_amp_short[0]/max_amp_long[0]));
//PlotNumeric("长短波动比", long_short_ratio);
//PlotNumeric("高周期", period_highest);
//PlotNumeric("低周期", period_lowest);
 
v_mid_h_l = (High + Low)/2; // 计算高低价的中值
amp_res_high = (High + v_mid_h_l)/2 + max_amp_short[0]*long_short_ratio; // 根据最大波动计算阻力高点价咯
amp_res_low = (Low + v_mid_h_l)/2 - max_amp_short[0]*long_short_ratio; // 根据最大波动计算阻力低点价咯
//PlotNumeric("波阻高", amp_res_high[0]);
//PlotNumeric("波阻低", amp_res_low[0]);
 
// 计算指定周期内价咯极值
// hiest = Highest(High, Period); // 固定周期
hiest = Highest(High, period_highest); // 获得周期内价咯高点
Numeric last_res_high = Max(hiest[1], v_super_high[1]); // 计算前K线上阻力价咯
//Numeric last_res_high = hiest[1]; // 上阻力价咯设为前最高点价咯
//Numeric last_res_high = v_super_high[1]; //
[url=http://www.70822.com/soft/sort013/sort010/down-137739.html]超级策略原始版(易盛软件指标源码)[/url]

关于本站 | 网站帮助 | 广告合作 | 声明 | 友情连接 | 网站地图 |
分析家公式网声明:本站所有股票公式软件资料均网上公开收集,如侵权请联系删帖。站内所有广告,均与本站无关!
Copyright © 2003-2024 70822.Com. All Rights Reserved .
页面执行时间:62.50000 毫秒