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

软件名称:[B]金字塔 闲来无聊,发布一个本人常用的模版: 移动止损模版_leevolvo版[/B]
软件类型:国产软件
运行环境:Win9X/Win2000/WinXP/Win2003/
软件语言:简体中文
授权方式:免费版
软件大小:1.00 KB
官方主页:Home Page
更新时间:2012-01-20 10:10:35
软件简介:

//该模版用于历史评测,不用于实盘交易。
//该模版的亮点在于模块化和扩展性

//理解模版精华后,各种思路可在模版里随便添加、删除、扩展等
variable:zs=c,hl=c;//声明全局变量zs、hl
ma5:=ma(c,5);
ma20:=ma(c,20);
atr:=ma(h-l,20);//市场平均波动幅度
buycond:=cross(ma5,ma20);//平空开多条件
sellcond:=cross(ma20,ma5);//平多开空条件

if holding>0 then begin
多止损:zs;
if l<zs then sell(1,1,limitr,min(o,zs)-mindiff);
else if sellcond then sell(1,1,limitr,c);
end

if holding<0 then begin
空止损:zs;
if h>zs then sellshort(1,1,limitr,max(o,zs)+mindiff);
else if buycond then sellshort(1,1,limitr,c);
end

if holding=0 and buycond then begin//多头开仓
buy(1,1,limitr,c);
zs:=c-2*atr;
hl:=c;//hl开仓后的最有利价位,刚买入时,最有利价位为开仓价
end

if holding=0 and sellcond then begin//空头开仓
buyshort(1,1,limitr,c);
zs:=c+2*atr;
hl:=c;
end

if holding>0 and enterbars>0 and h>hl then begin//最高价抬升,止损位相应地抬升
hl:=h;
zs:=hl-2*atr;
end

if holding<0 and enterbars>0 and l<hl then begin//最低价下降,止损位相应地下移
hl:=l;
zs:=l+2*atr;
end


 


[url=http://www.70822.com/soft/sort013/sort068/down-43393.html]金字塔 闲来无聊,发布一个本人常用的模版: 移动止损模版_leevolvo版[/url]

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