楼兰的歌曲西海情歌:海龟交易系统和程式码(2) - 交易逻辑及策略探讨 - 策略交易高峰会 EasyLangu...
来源:百度文库 编辑:偶看新闻 时间:2024/09/21 08:53:30
海龟交易系统和程式码(2)
楼主 简繁发表于 2010-6-17 14:04 | 只看该作者 | 倒序看帖 | 打印 程式码.显示20日突破系统,另还有55日突破系统程式码,有兴趣者私下交流讨论- input: InitialBalance(500000);
- vars: N(0), StopLoss(1), DV(0), BB(0), AccountBalance(0), DollarRisk(0), LTT(0), Tracker(0), LastTrade(0), HBP(0),
- LBP(0);
- if marketposition = 0 then begin BB = 0;
- N = AvgTrueRange(20); DV= N*BigPointValue; AccountBalance =InitialBalance;
- DV = N * BigPointValue; AccountBalance =InitialBalance + netprofit;
- DollarRisk =AccountBalance * .01; LTT =IntPortion(DollarRisk/DV);
- StopLoss = 2 * DV * LTT;
- if LastTrade = -1 then begin
- buy LTT shares next barhighest(h,20) or higher;
- buy LTT shares next barhighest(h,20) + (0.5*N) or higher;
- buy LTT shares next barhighest(h,20) + (1.0*N) or higher;
- buy LTT shares next barhighest(h,20) + (1.5*N) or higher;
- sellshort LTT shares nextbar lowest(l,20) or lower;
- sellshort LTT shares nextbar lowest(l,20) - (0.5*N) or lower;
- sellshort LTT shares nextbar lowest(l,20) - (1.0*N) or lower;
- sellshort LTT shares nextbar lowest(l,20) - (1.5*N) or lower;
- end;
- // LONG 20
- if LastTrade = -1 and marketposition =1 then begin
- BB = BB + 1;
- if currentshares = LTT then begin
- buy LTT shares next barhighest(h,20)[BB] + (0.5*N) or higher;
- buy LTT shares next barhighest(h,20)[BB] + (1.0*N) or higher;
- buy LTT shares next barhighest(h,20)[BB]+ (1.5*N) or higher;
- end;
- if currentshares = LTT * 2 then begin
- buy LTT shares next barhighest(h,20)[BB] + (1.0*N) or higher;
- buy LTT shares next barhighest(h,20)[BB] + (1.5*N) or higher;
- end;
- if currentshares = LTT * 3 then
- buy LTT shares next barhighest(h,20)[BB] + (1.5*N) or higher;
- end;
- sell ("out-S") next barlowest(l,10) or lower;
- // SHORT 20
- if LastTrade = -1 and marketposition =-1 then begin
- BB = BB + 1; if currentshares = LTTthen begin
- sellshort LTTshares next bar lowest(l,20)[BB] - (0.5*N) or lower;
- sellshort LTTshares next bar lowest(l,20)[BB] - (1.0*N) or lower;
- sellshort LTTshares next bar lowest(l,20)[BB] - (1.5*N) or lower;
- end;
- if currentshares = LTT * 2 then begin
- sellshort LTT shares nextbar lowest(l,20)[BB] - (1.0*N) or lower;
- sellshort LTT shares nextbar lowest(l,20)[BB] - (1.5*N) or lower;
- end;
- if currentshares = LTT * 3 then
- sellshort LTT shares nextbar lowest(l,20)[BB] - (1.5*N) or lower;
- end;
海龟交易系统和程式码(1)
海龟交易系统和程式码(2)
沪深300的简易海龟突破系统
类海龟系统调整的心得分享
交易逻辑
电话交易,网上交易,通过证券公司的交易系统交易哪个快些?
海龟和熊哪个更能顶
花程式和胎座类型
请教银行交易系统的工作流程以及功能和需求~`
求大福证券至尊宝港股交易系统用户名和密码?
名词解释:组合逻辑和时序逻辑
玳瑁和海龟有什么区别?
乌龟和海龟都有哪些不同之处?
海龟和乌龟 谁的寿命长
海龟、乌龟、网吧和甲鱼都是什么?
物理分区 和 逻辑分区
什么是逻辑地址和网络地址?
简易逻辑问题2
股票证券交易系统中的白线和黄线各代表什么意思?还有“委比”又是什么意思?
股票证券交易系统中的白线和黄线各代表什么意思?还有“委比”又是什么意思?
上课时老师说“情感逻辑”和“生活逻辑”
上课时老师说“情感逻辑”和“生活逻辑”
时序逻辑和组合逻辑有什么区别?
乌龟和海龟都生活在海里吗
冒险岛的大海龟和祖母绿抉择!
讲述三层架构程式和服务器的结构运原理
所有的文件和程式的扩展名。如XLS
两人合伙投资有关程式和法律问题