当前位置:分析家公式网 → 股票公式 → 开拓者公式 → 一键转帖:开拓者道氏理论交易策略源码
软件名称:[B]开拓者道氏理论交易策略源码[/B]
软件类型:国产软件
运行环境:Win2000/WinXP/Win2003/WinVista
软件语言:简体中文
授权方式:共享软件
软件大小:0 Bytes
官方主页:Home Page
更新时间:2013-03-12 04:49:43
软件简介:
道氏理论内容:
- //------------------------------------------------------------------------
- // 简称: D1
- // 名称: 道氏理论
- // 类别: 交易指令
- // 类型: 多头建仓
- // 输出: www.70822.com
- //------------------------------------------------------------------------
-
- Params
- Numeric ATime(918);
- Numeric CTime(1510);
- Numeric Lot(1);
- Numeric MoneyLoss(0.6);
- Numeric BarCross(1);
- Numeric Length(5);
-
- Vars
- Numeric bTime(0);
- Numeric MyClose(0);
- Numeric MyDiff(0);
- NumericSeries estP(0);
- NumericSeries ExitP(0);
- NumericSeries Position(0);
- NumericSeries est(0);
- NumericSeries est1(0);
- NumericSeries est2(0);
- NumericSeries est3(0);
-
- Bool bTimeCon;
- Bool BarUpCon;
- Bool BarDownCon;
- Bool BarExitCon;
- Bool LongOpenCon;
- Bool ShortOpenCon;
- Bool LongExitCon;
- Bool ShortExitCon;
-
- Begin
-
- If (Date != Date[1])
- {
- est = Open;
- est1 = Open;
- est2 = Open;
- est3 = Open;
- estP = 0;
- ExitP = 0;
- Position = 0;
- MyClose = Open;
- }
- Else
- {
- est = est[1];
- est1 = est1[1];
- est2 = est2[1];
- est3 = est3[1];
- estP = estP[1];
- ExitP = ExitP[1];
- Position = Position[1];
- If(Length != 0) MyClose = Average(Close[1],Length);
- Else MyClose = Close[1];
- }
-
- MyDiff = MyClose * BarCross / 1000;
-
- bTime = IntPart(Time*10000);
- bTimeCon = (bTime > ATime) And (bTime < CTime);
-
- If((MyClose < est And MyClose < est1) Or (MyClose > est And MyClose > est1)) est = MyClose;
- If(((MyClose - est) > MyDiff And est < est1) Or ((est - MyClose) > MyDiff And est > est1))
- {
- est3 = est2;
- est2 = est1;
- est1 = est;
- est = MyClose;
- }
-
- If(Position > 0 And High > estP) estP = High;
- If(Position < 0 And Low < estP) estP = Low;
- If(Position > 0) ExitP = estP * (100 - MoneyLoss) / 100;
- If(Position < 0) ExitP = estP * (100 + MoneyLoss) / 100;
-
- If(bTime >= CTime)
- {
[url=http://www.70822.com/soft/sort013/sort083/down-59404.html]开拓者道氏理论交易策略源码[/url]