人人爽天天爽夜夜爽qc-人人爽天天爽夜夜爽曰-人人天天爱天天做天天摸-人人天天夜夜-色网站在线-色网站在线看

您現在的位置:程序化交易>> 期貨公式>> 金字塔等>> 金字塔知識>>正文內容

修改一下 [金字塔]

咨詢內容: 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));?來源: www.kzuj.com.cn 金字塔資深技術: 抱歉,能力有限修改不了,這種語法結構我們不熟。建議你考慮提供邏輯思路,我們嘗試提供代碼范例。

 

有思路,想編寫各種指標公式,交易模型,選股公式,還原公式的朋友

可聯系技術人員 QQ: 262069696  點擊在線交流或微信號:cxh99cxh99  進行 有償收費 編寫!

怎么收費,代編流程等詳情請點擊閱讀!

(注:由于人數限制,QQ或微信請選擇方便的一個聯系我們就行,加好友時請簡單備注下您的需求,否則無法通過。謝謝您!)


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

相關文章

    沒有相關內容
主站蜘蛛池模板: 亚洲影音先锋看看 | 精品久久网 | 日韩手机在线视频 | 欧美乱操| 成人在线影视 | a毛片免费全部播放毛 | www视频免费看| 日本福利片国产午夜久久 | 成人黄色免费网址 | 亚洲一区二区三区国产精品 | 91福利社在线观看 | 日本一道免费一区二区三区 | 一个人在线看免费的视频 | 欧美人与牲动交a欧美精品 欧美人与日本人xx在线视频 | 欧美又黄又嫩大片a级 | 欧美亚洲日本一区 | 色护士精品影院www 色狠狠色综合久久8狠狠色 | 91啪国自产中文字幕在线 | 一级特级女人18毛片免费视频 | 亚洲免费色视频 | 中文字幕在线一区 | www视频 | 99久久国产综合精品麻豆 | 日韩精品欧美激情国产一区 | 欧美日韩亚洲二区在线 | 国产日韩精品欧美一区视频 | 欧美成人观看视频在线 | 特级毛片ww特级毛片w免费版 | 成人观看免费大片在线观看 | 久久精品视频91 | 九九视频免费精品视频免费 | 999国内精品视频免费 | 精品亚洲成a人片在线观看 精品亚洲成a人在线播放 | 日本理论片在线播放 | 国产黄色在线观看 | 精品久久久久久中文字幕202o | 天堂伊人| 拔擦拔擦8x高清在线 | 欧美黑人巨大硬xxx猛性 | 92精品国产自产在线观看48 | 欧美日韩一区二区三区在线观看 |