大伊人青草狠狠久久-大伊香蕉精品视频在线-大伊香蕉精品一区视频在线-大伊香蕉在线精品不卡视频-大伊香蕉在线精品视频75-大伊香蕉在线精品视频人碰人

您現(xiàn)在的位置:程序化交易>> 期貨公式>> 交易開拓者(TB)>> 開拓者公式>>正文內(nèi)容

日內(nèi)轉(zhuǎn)向加倉交易系統(tǒng)模型TB源碼[開拓者公式]

//------------------------------------------------------------------------
// 簡稱: DayChangeTrenchV1
// 名稱: 日內(nèi)轉(zhuǎn)向加倉交易系統(tǒng)模型TB源碼
// 類別: 公式應(yīng)用
// 類型: 用戶應(yīng)用
//------------------------------------------------------------------------

Params

Bool  bInitStatues(false); // 初始化標(biāo)志,修改初始倉位時需設(shè)置為True
    Numeric InitMyRealMp(0);   // 初始化當(dāng)前倉位,正數(shù)表示多單,負數(shù)表示空單

Numeric FirstGrid(30);     // 第一筆交易的間距,最小跳動;
    Numeric AddGrid(5);        // 加倉間距,最小跳動

Numeric TotalGrids(10);    // 最大交易次數(shù)

Numeric TrailingGrid(30);  // 移動止損間距,最小跳動

Numeric EveryLots(1);      // 每次開倉手數(shù)

Numeric OffSet(1);         // 委托價偏差,默認買賣價偏差為1個滑點

Numeric ExitOnCloseMins(14.58);  //收盤平倉時間


Vars

Numeric HighAfterLongEntry;

Numeric LowAfterShortEntry;

Numeric MyRealMp(0);

Numeric MinPoint;

Numeric tmpPrice;

Numeric tmpLots;


Begin

MinPoint=Minmove*PriceScale;

MyRealMp=GetGlobalVar(0);

HighAfterLongEntry=GetGlobalVar(1);

LowAfterShortEntry=GetGlobalVar(2);

 

if (BarStatus==0 And (MyRealMp==InvalidNumeric || bInitStatues))

{

MyRealMp=InitMyRealMp;

}

if (Date<>Date[1])

{

HighAfterLongEntry=High;

LowAfterShortEntry=Low;

MyRealMp=0;

}Else

{

HighAfterLongEntry=Max(HighAfterLongEntry,High);

LowAfterShortEntry=Min(Low,LowAfterShortEntry);

} // www.weiqiv.net.cn

If (Time<ExitOnCloseMins/100)

{

If ( MyRealMp>0 And HighAfterLongEntry-Low>=TrailingGrid*MinPoint

And(High-Low<TrailingGrid*MinPoint Or(High-Low>=TrailingGrid*MinPoint And close<Open)))

{

tmpPrice=Max(HighAfterLongEntry-(TrailingGrid-OffSet)*MinPoint,Low);

tmpLots=Abs(MyRealMp*EveryLots);

Sell(tmpLots,tmpPrice);

MyRealMp=0;

LowAfterShortEntry=Low;

}Else

If ( MyRealMp<0 And High-LowAfterShortEntry>=TrailingGrid*MinPoint

And(High-Low<TrailingGrid*MinPoint Or(High-Low>=TrailingGrid*MinPoint And close>Open)))

{

tmpPrice=Min(LowAfterShortEntry+(TrailingGrid+OffSet)*MinPoint,High);

tmpLots=Abs(MyRealMp*EveryLots);

BuyToCover(tmpLots,tmpPrice);

MyRealMp=0;

HighAfterLongEntry=0;

}

// 第一筆多單開倉

if (MyRealMp==0 And High-LowAfterShortEntry>=FirstGrid*MinPoint)

{

tmpPrice=Min(LowAfterShortEntry+(FirstGrid+OffSet)*MinPoint,High);

tmpLots=EveryLots;

Buy(tmpLots,tmpPrice);

MyRealMp=1;

HighAfterLongEntry=High;

}Else

// 多單加倉

if (MyRealMp> 0 And MyRealMp <TotalGrids And High-LowAfterShortEntry>=(FirstGrid+MyRealMp*AddGrid)

*MinPoint)

{

tmpPrice=Min(LowAfterShortEntry+(FirstGrid+MyRealMp*AddGrid+OffSet)*MinPoint,High);

tmpLots=EveryLots;

Buy(tmpLots,tmpPrice);

MyRealMp=MyRealMp+1;

}Else

// 第一筆空單開倉

if (MyRealMp==0 And HighAfterLongEntry-Low>=TrailingGrid*MinPoint )

{

tmpPrice=Max(HighAfterLongEntry-(FirstGrid-OffSet)*MinPoint,Low);;

tmpLots=EveryLots;

SellShort(tmpLots,tmpPrice);

MyRealMp=-1;

LowAfterShortEntry=Low ;

}Else

// 空單加倉 www.weiqiv.net.cn

if (MyRealMp< 0 And -1*MyRealMp <TotalGrids And HighAfterLongEntry-Low>=(FirstGrid+MyRealMp*AddGrid)

*MinPoint)

{

tmpPrice=Max(HighAfterLongEntry-(FirstGrid-Abs(MyRealMp*AddGrid)-OffSet)*MinPoint,High);

tmpLots=EveryLots;

SellShort(tmpLots,tmpPrice);

MyRealMp=MyRealMp-1;

}


}Else

If (Time>ExitOnCloseMins/100)

{

If (MyRealMp>0)

{

tmpLots=Abs(MyRealMp*EveryLots);

tmpPrice=Close;

Sell(tmpLots,tmpPrice);

MyRealMp=0;

}

If(MyRealMp<0)

{

tmpLots=Abs(MyRealMp*EveryLots);

tmpPrice=Close;

BuyToCover(tmpLots,tmpPrice);

MyRealMp=0;

}

}

SetGlobalVar(0,MyRealMp);

SetGlobalVar(1,HighAfterLongEntry);

SetGlobalVar(2,LowAfterShortEntry);

Commentary("MyRealMp="+Text(MyRealMp));

Commentary("HighAfterLongEntry="+Text(HighAfterLongEntry));

Commentary("LowAfterShortEntry="+Text(LowAfterShortEntry));

//SetExitOnClose;


End

//------------------------------------------------------------------------
// 編譯版本GS2010.12.08
// 用戶版本2012/03/17 16:00
// 版權(quán)所有 www.weiqiv.net.cn QQ 1145508240

// 更改聲明TradeBlazer Software保留對TradeBlazer平臺
//每一版本的TrabeBlazer公式修改和重寫的權(quán)利
//------------------------------------------------------------------------

 

 

有思路,想編寫各種指標(biāo)公式,程序化交易模型,選股公式,預(yù)警公式的朋友

可聯(lián)系技術(shù)人員 QQ: 1145508240  有需要幫忙請點擊這里留言!!!進行 有償 編寫!不貴!點擊查看價格!

 


【字體: 】【打印文章】【查看評論

相關(guān)文章

    沒有相關(guān)內(nèi)容
  主站蜘蛛池模板: 亚洲人和日本人jzz护士 | 嫩模被xxxx视频在线观看 | 亚洲成色在线综合网站 | 一级特级欧美午夜片免费观看 | 一二三四社区在线播放 | 亚洲精品综合欧美一区二区三区 | 2021午夜国产精品福利 | 人人爽天天爽 | 在线不卡福利 | 国内精品久久久久久久999下 | 亚洲欧美中文字幕高清在线一 | 新四虎影院 | 四虎影视在线观看永久地址 | 中文字幕一区二区在线观看 | 尹人香蕉久久99天天拍欧美p7 | 久久99久久99精品免观看动漫 | 国产欧美精品一区二区三区–老狼 | 幻女bbwxxxxyounu | 337p粉嫩大胆色噜噜噜 | 亚洲日韩精品欧美一区二区一 | 亚洲小视频网站 | 成人欧美在线 | 国产精品久久国产精麻豆99网站 | 国产成人亚洲精品91专区高清 | 成人午夜大片 | 国产成人丝袜网站在线观看 | 久久久久久久国产精品视频 | 99精品久久久久中文字幕 | 久草在线中文最新视频 | 97手机影院 | 国产精品香蕉在线观看不卡 | 国产资源福利 | 欧洲亚洲视频 | 在线国产中文字幕 | 日韩一区二区三区在线 | www.欧美| 久久影院朴妮唛 | 久草在线国产 | 久久久久久一级毛片免费无遮挡 | 成年女人免费观看视频 | 四虎永久免费地址 |