好心人 幫幫忙啊
作者:開拓者 TB 來源:cxh99.com 發(fā)布時(shí)間:2016年06月09日
- 咨詢內(nèi)容:
本帖最后由 陳良利 于 2016-1-30 20:22 編輯
麻煩幫我寫個(gè)日內(nèi)震蕩交易公式 條件是1. 開盤到早上10點(diǎn)這段時(shí)間的最高點(diǎn)和最低點(diǎn)為上下軌,2.: 10點(diǎn)后收盤價(jià)下穿最高點(diǎn)上軌后做空,收盤價(jià)格大于最高點(diǎn)上軌平倉(cāng) 3: 10點(diǎn)后收盤價(jià)上穿最低點(diǎn)下軌后做多,收盤價(jià)格小于最低點(diǎn)上軌平倉(cāng) 4 沒有平倉(cāng)的14.59平倉(cāng)。好心人幫幫忙啊 謝謝啊
- TB技術(shù)人員:
Params
Vars
Numeric H10(0);
numeric L10(0);
numeric HH(0);
numeric LL(0);
Begin
If( time <=0.1000)
{
H10=Highest(h,barssincetoday+1);
L10=Lowest(l,barssincetoday+1);
SetGlobalVar(1,H10);
SetGlobalVar(2,L10);
}
If( time>=0.1000)
{
PlotNumeric("h10",getglobalvar(1));
PlotNumeric("l10",getglobalvar(2));
HH=getglobalvar(1);
LL=GetGlobalVar(2);
}
If(time>0.1000 and time<0.1455 )
{
if (MarketPosition==0 and close[1]>HH And close<HH)
SellShort(1,close);
if (marketposition==0 and close[1]<LL and close>LL)
Buy(1,close);
if (marketposition==-1 and close>HH ) BuyToCover(1,close);
if (marketposition==1 and close<LL ) Sell(1,close);
}
if(time>=0.1455 and marketposition!=0)
{BuyToCover(1,close);
Sell(1,close);};
end
- TB客服:
測(cè)試結(jié)果 是虧損的。