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

软件名称:[B]金字塔震荡交易系统策略源码[金字塔模型][/B]
软件类型:国产软件
运行环境:Win2000/WinXP/Win2003/WinVista
软件语言:简体中文
授权方式:共享软件
软件大小:0 Bytes
官方主页:Home Page
更新时间:2013-03-10 00:41:59
软件简介:

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

input:p(5,1,60,1);

lc:=ref(close,1);
rsi:=sma(max(close-lc,0),p,1)/
sma(abs(close-lc),p,1)*100;

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


if holding=0 then begin
 if entertime and rsi<=10 then
  buy(1,1,limitr,close);
end

if holding=0 then begin
 if entertime and rsi>=90 then
  buyshort(1,1,limitr,close);
end

if holding>0 then begin
 if entertime and rsi>=90 then begin
  sell(1,holding,limitr,close),orderqueue;
  buyshort(1,1,limitr,close),orderqueue;
 end
 
 if exittime then
  sell(1,holding,limitr,close);
end

if holding<0 then begin
 if entertime and rsi<=10 then begin
  sellshort(1,holding,limitr,close),orderqueue;
  buy(1,1,limitr,close),orderqueue;
 end
 
 if exittime then
  sellshort(1,holding,limitr,close);
end

盈亏:asset,noaxis,colormagenta;     
收益:(asset-50000)/50000,linethick0;
次数:totaltrade,linethick0;
成功率:percentwin,linethick0;
连亏:maxseqloss,linethick0;
连赢:maxseqwin,linethick0;


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

源码解析:

输出RUNMODE:0
输出INPUT:P(5,1,60,1)
LC赋值:昨收
RSI赋值:收盘价-LC和0的较大值的P日[1日权重]移动平均/收盘价-LC的绝对值的P日[1日权重]移动平均*100
ENTERTIME赋值:时间>=143000 AND 时间<=145500
EXITTIME赋值:时间>=150000
逻辑判断 HOLDING=0 THEN BEGIN 逻辑判断 ENTERTIME AND RSI<=10 THEN  BUY(1,1,LIMITR,收盘价)
ENDIF HOLDING=0 THEN BEGIN 逻辑判断 ENTERTIME AND RSI>=90 THEN  BUYSHORT(1,1,LIMITR,收盘价)
ENDIF HOLDING>0 THEN BEGIN 逻辑判断 ENTERTIME AND RSI>=90 THEN BEGIN  SELL(1,HOLDING,LIMITR,收盘价),ORDERQUEUE
  BUYSHORT(1,1,LIMITR,收盘价),ORDERQUEUE
 END  逻辑判断 EXITTIME THEN  SELL(1,HOLDING,LIMITR,收盘价)
ENDIF HOLDING<0 THEN BEGIN 逻辑判断 ENTERTIME AND RSI<=10 THEN BEGIN  SELLSHORT(1,HOLDING,LIMITR,收盘价),ORDERQUEUE
  BUY(1,1,LIMITR,收盘价),ORDERQUEUE
 END  逻辑判断 EXITTIME THEN  SELLSHORT(1,HOLDING,LIMITR,收盘价)
输出END盈亏:ASSET,NOAXIS,画洋红色
输出      收益:(ASSET-50000)/50000,线宽为0
输出次数:TOTALTRADE,线宽为0
输出成功率:PERCENTWIN,线宽为0
输出连亏:MAXSEQLOSS,线宽为0
输出连赢:MAXSEQWIN,线宽为0
 
 


[url=http://www.70822.com/soft/sort013/sort068/down-59309.html]金字塔震荡交易系统策略源码[金字塔模型][/url]

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