打印本文
關(guān)閉窗口
開拓者道氏理論交易策略源碼
作者:開拓者 TB 來源:cxh99.com 發(fā)布時間:2012年11月17日
道氏理論內(nèi)容:
//------------------------------------------------------------------------
// 簡稱: D1
// 名稱: 道氏理論
// 類別: 交易指令
// 類型: 多頭建倉
// 輸出:
www.tumamayizhan.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)
{
If (Position > 0)
Sell(lot,Open);
Else
BuyToCover(lot,Open);
}
If(bTimeCon)
{
If (Position == 0)
{
If(est3 < est1 And (est2 / 2000 + est2) <= est And est3 < est2)
{
Buy(lot,Open);
Position = lot;
estP = Open;
ExitP = estP * (100 - MoneyLoss) / 100;
Commentary("LongOpen");
}
Else If(est3 > est1 And (est2 - est2 / 2000) >= est And est3 > est2)
{
SellShort(lot,Open);
Position = lot * -1;
estP = Open;
ExitP = estP * (100 + MoneyLoss) / 100;
Commentary("ShortOpen");
}
}
Else
{
If(Position > 0 And est3 > est1)
{
Sell(lot,Open);
Position = 0;
Commentary("LongExit1");
}
Else If(Position < 0 And est3 < est1)
{
BuyToCover(lot,Open);
Position = 0;
Commentary("ShortExit1");
}
Else If(Position > 0 And Open < ExitP)
{
Sell(lot,Open);
Position = 0;
Commentary("LongExit2");
}
Else If(Position < 0 And Open > ExitP)
{
BuyToCover(lot,Open);
Position = 0;
Commentary("ShortExit2");
}
}
}
Commentary("Position = "+Text(Position));
Commentary("ExitP = "+Text(ExitP));
End
//------------------------------------------------------------------------
// 編譯版本 GS2004.06.12
// 用戶版本 2011/05/03 13:21
// 版權(quán)所有
www.tumamayizhan.com
// 更改聲明 TradeBlazer Software保留對TradeBlazer平臺
// 每一版本的TrabeBlazer公式修改和重寫的權(quán)利
//------------------------------------------------------------------------
打印本文
關(guān)閉窗口
主站蜘蛛池模板:
国外性xxxnxxxf视频
|
欧美国产日韩A在线观看
|
国产精品熟女一区二区
|
国产一在线精品一区在线观看
|
一个人hd高清在线观看
|
欧美sss视频
|
公和我在厨房好爽中文字幕
|
色综合67194
|
天天综合天天综合色在线
|
久久国产精品无码一区二区三区
|
熟妇人妻不卡中文字幕
|
国产一级特黄在线播放
|
2022最新国产在线
|
暴力调教一区二区三区
|
免费观看毛片视频
|
99热99re
|
无码人妻av一二区二区三区
|
久久精品国产99久久久
|
狠狠色婷婷丁香综合久久韩国
|
国产免费变态视频网址网站
|
中文字幕无码无码专区
|
欧美日韩一区二区三区色综合
|
无套内射在线无码播放
|
亚洲综合成人网
|
韩国福利影视一区二区三区
|
在线日韩av永久免费观看
|
久久久99久久久国产自输拍
|
精品国精品自拍自在线
|
国产精华av午夜在线观看
|
一二三高清区线路1
|
日韩欧美国产师生制服
|
亚洲狠狠色丁香婷婷综合
|
巨胸喷奶水www永久免费
|
少妇真实被内射视频三四区
|
九月婷婷综合婷婷
|
熟妇人妻va精品中文字幕
|
国产AV午夜精品一区二区三区
|
人人澡人人澡人人看添欧美
|
在线观看免费视频资源
|
中文人妻熟妇乱又伦精品
|
曰批视频免费30分钟成人
|