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

软件名称:[B]红黑三兵交易系统源码[金字塔模型][/B]
软件类型:国产软件
运行环境:Win2000/WinXP/Win2003/WinVista
软件语言:简体中文
授权方式:共享软件
软件大小:0 Bytes
官方主页:Home Page
更新时间:2013-03-06 05:22:12
软件简介:


 

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

 runmode:0;

 variable:myholding=0;

 buycond:=ref(all(isup,3),1);
 buyshortcond:=ref(all(isdown,3),1);

 if myholding=0 and buycond then begin
     lots:=cash(0)/(open*multiplier*0.1);
     buy(1,lots,limitr,open);
     myholding:=lots;
 end

 if myholding=0 and buyshortcond then begin
     lots:=cash(0)/(open*multiplier*0.1);
     buyshort(1,lots,limitr,open);
     myholding:=-lots;
 end

 if myholding>0 and time=closetime(0) then begin
     sell(1,myholding,limitr,close);
     myholding:=0;
 end

 if myholding<0 and time=closetime(0) then begin
     sellshort(1,myholding,limitr,close);
     myholding:=0;
 end

==================================

源码解析:

输出 RUNMODE:0
输出 VARIABLE:MYHOLDING=0
BUYCOND赋值:昨日ALL(ISUP,3)
BUYSHORTCOND赋值:昨日ALL(ISDOWN,3)
LOTS赋值:CASH(0)/(开盘价*MULTIPLIER*0.1)
     BUY(1,LOTS,LIMITR,开盘价)
MYHOLDING赋值:LOTS
LOTS赋值:CASH(0)/(开盘价*MULTIPLIER*0.1)
     BUYSHORT(1,LOTS,LIMITR,开盘价)
MYHOLDING赋值:-LOTS
 END 逻辑判断 MYHOLDING>0 AND 时间=CLOSETIME(0) THEN BEGIN     SELL(1,MYHOLDING,LIMITR,收盘价)
MYHOLDING赋值:0
 END 逻辑判断 MYHOLDING<0 AND 时间=CLOSETIME(0) THEN BEGIN     SELLSHORT(1,MYHOLDING,LIMITR,收盘价)
MYHOLDING赋值:0
 END

 


[url=http://www.70822.com/soft/sort013/sort068/down-59333.html]红黑三兵交易系统源码[金字塔模型][/url]

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