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

软件名称:[B]金字塔布林带通道突破交易系统[金字塔模型][/B]
软件类型:国产软件
运行环境:Win2000/WinXP/Win2003/WinVista
软件语言:简体中文
授权方式:共享软件
软件大小:0 Bytes
官方主页:Home Page
更新时间:2013-03-09 00:04:23
软件简介:

金字塔公式 金字塔模型策略源码:runmode:0;

input:m(30,1,300,1);
input:n(2,0.5,10,0.5);

variable:myasset=30000;

mid:=ma(close,m);
upper:=mid+n*std(close,m);
lower:=mid-n*std(close,m);

entertime:=time>=091500 and time<=145500;
exittime:=time>=150000;

highest:=ref(upper,1);
lowest:=ref(lower,1);

longcond:=entertime and high>=highest;
longprice:=max(highest,open);

shortcond:=entertime and low<=lowest;
shortprice:=min(lowest,open);

if holding=0 then begin
if longcond then
buy(1,1,limitr,longprice);
end

if holding=0 then begin
if shortcond then
buyshort(1,1,limitr,shortprice);
end

if holding>0 then begin
if exittime then
sell(1,holding,limitr,close);
end

if holding<0 then begin
if exittime then
sellshort(1,holding,limitr,close);
end

if exittime then
myasset:=asset;

资产:myasset,colorred,noaxis;


复制上述代码粘贴到到公式管理器

源码解析:

输出RUNMODE:0
输出 INPUT:M(30,1,300,1)
输出 INPUT:N(2,0.5,10,0.5)
输出 VARIABLE:MYASSET=30000
MID赋值:收盘价的M日简单移动平均
UPPER赋值:MID+N*收盘价的M日估算标准差
LOWER赋值:MID-N*收盘价的M日估算标准差
ENTERTIME赋值:时间>=091500 AND 时间<=145500
EXITTIME赋值:时间>=150000
HIGHEST赋值:昨日UPPER
LOWEST赋值:昨日LOWER
LONGCOND赋值:ENTERTIME AND 最高价>=HIGHEST
LONGPRICE赋值:HIGHEST和开盘价的较大值
SHORTCOND赋值:ENTERTIME AND 最低价<=LOWEST
SHORTPRICE赋值:LOWEST和开盘价的较小值
 逻辑判断 HOLDING=0 THEN BEGIN 逻辑判断 LONGCOND THEN BUY(1,1,LIMITR,LONGPRICE)
 END 逻辑判断 HOLDING=0 THEN BEGIN 逻辑判断 SHORTCOND THEN BUYSHORT(1,1,LIMITR,SHORTPRICE)
 END 逻辑判断 HOLDING>0 THEN BEGIN 逻辑判断 EXITTIME THEN SELL(1,HOLDING,LIMITR,收盘价)
 END 逻辑判断 HOLDING<0 THEN BEGIN 逻辑判断 EXITTIME THEN SELLSHORT(1,HOLDING,LIMITR,收盘价)
MYASSET赋值:ASSET
输出 资产:MYASSET,画红色,NOAXIS
 
 


[url=http://www.70822.com/soft/sort013/sort068/down-59312.html]金字塔布林带通道突破交易系统[金字塔模型][/url]

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