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

您現(xiàn)在的位置:程序化交易>> 期貨公式>> 金字塔等>> 金字塔知識(shí)>>正文內(nèi)容

修改一下 [金字塔]

咨詢(xún)內(nèi)容: 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));?來(lái)源: www.weiqiv.net.cn 金字塔資深技術(shù): 抱歉,能力有限修改不了,這種語(yǔ)法結(jié)構(gòu)我們不熟。建議你考慮提供邏輯思路,我們嘗試提供代碼范例。

 

有思路,想編寫(xiě)各種指標(biāo)公式,交易模型,選股公式,還原公式的朋友

可聯(lián)系技術(shù)人員 QQ: 262069696  點(diǎn)擊在線交流或微信號(hào):cxh99cxh99  進(jìn)行 有償收費(fèi) 編寫(xiě)!

怎么收費(fèi),代編流程等詳情請(qǐng)點(diǎn)擊閱讀!

(注:由于人數(shù)限制,QQ或微信請(qǐng)選擇方便的一個(gè)聯(lián)系我們就行,加好友時(shí)請(qǐng)簡(jiǎn)單備注下您的需求,否則無(wú)法通過(guò)。謝謝您!)


【字體: 】【打印文章】【查看評(píng)論

相關(guān)文章

    沒(méi)有相關(guān)內(nèi)容
主站蜘蛛池模板: 国产成人精品综合 | 久久精品国产主播一区二区 | 波多野给衣一区二区三区 | 九九视频这里只有精品 | 天天舔天天射天天干 | 国产高清视频在线免费观看 | 久久午夜宅男免费网站 | 美女久久久久久久久久久 | 国产精品久久久久久久网站 | 综合色天天 | 国产九九热 | 精品日本久久久久久久久久 | 国产特级毛片 | 免费的黄色网 | 香蕉毛片 | 亚洲免费在线观看视频 | 久在线视频| 一级特级欧美aaaaa毛片 | 日韩在线一区二区 | 日本人69视频jizz免费看 | 综合99| 久青草国产观看在线视频 | 欧美人交性视频在线香蕉 | 日本久色 | 亚洲swag精品自拍一区 | 伊人久久网站 | 日本一级毛片 | 2021国产成人综合亚洲精品 | 奶交性视频欧美 | 高清国产一级毛片国语 | 国产高清看片日韩欧美久久 | 欧美激情精品久久久久久久九九九 | 五月婷婷综合在线视频 | 欧美国产一区二区二区 | 久久99综合 | 国产亚洲精品sese在线播放 | 久久国内精品自在自线观看 | 亚洲日日做天天做日日谢 | 青草草在线观看 | 乱子伦免费视频中文字幕 | 98色花堂国产精品首页 |