Rss & SiteMap

金字塔客服中心 - 专业程序化交易软件提供商 http://www.weistock.com/bbs/

专业程序化软件提供商
共4 条记录, 每页显示 10 条, 页签: [1]
[浏览完整版]

标题:[求助]想从开拓者哪里嫁接一个模型去金字塔用

1楼
XO仔 发表于:2013/3/29 10:11:55
下边的思路希望各位老师帮忙修改成简单的金字塔模型,好让我学习学习,谢谢!!


Params
Numeric offset(0);
Numeric funds(10000);
Numeric lotPercent(0.25);

Vars
NumericSeries HighLine_yesterday;
NumericSeries LowLine_yesterday;
Numeric lots;

Begin

lots = 0;//IntPart(lotPercent * (funds + NetProfit) / (Close[1] * ContractUnit * MarginRatio));
//PlotNumeric("lots",lots);
//PlotNumeric("ContractUnit",ContractUnit);

HighLine_yesterday = HighD(1);
LowLine_yesterday = LowD(1);

PlotNumeric("HighLine_yesterday",HighLine_yesterday);
PlotNumeric("LowLine_yesterday",LowLine_yesterday);

If(High > HighLine_yesterday And MarketPosition <= 0)
{Buy(lots , HighLine_yesterday + offset);
}
If(Low < LowLine_yesterday And MarketPosition >= 0 )
{SellShort(lots , LowLine_yesterday - offset);}

End

2楼
jinzhe 发表于:2013/3/29 10:21:35

不解释一下这些话的意思,我们怎么处理。。。

3楼
XO仔 发表于:2013/3/29 10:27:00
引用了昨天的 H 和 L  在一分钟周期里边 只有价格突破昨天的H 就做多 突破昨天的L就追空  都是平仓反手操作
4楼
jinzhe 发表于:2013/3/29 10:34:30

h_zuori:=callstock(stklabel,vthigh,6,-1);

l_zuori:=callstock(stklabel,vtlow,6,-1);

 

if h>h_zuori then begin

sellshort(holding<0,0,thisclose);

buy(holding=0,1,thisclose);

end

 

if l<l_zuori then begin

sell(holding>0,0,thisclose);

buyshort(holding=0,1,thisclose);

end

共4 条记录, 每页显示 10 条, 页签: [1]


Powered By Dvbbs Version 8.3.0
Processed in 0.05078 s, 3 queries.