Rss & SiteMap

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

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

标题:三条均线单根K线内交叉怎么写

1楼
fang圆 发表于:2015/9/15 8:41:02
jinzhe老师  三条均线在同一根K线内交叉交易策略怎么写  
     也就是说三条不同周期的均线(10,30,80),
     在图表中10,30线在同一根K线体内向下穿80线给卖出信号
     在图表中10,30线在同一根K线体内向上穿80线给买入信号
     (三条均线不一定要完全交叉于同一点,只是在同一K线体内完成三线上穿或下穿的交汇形态就算)
2楼
jinzhe 发表于:2015/9/15 8:52:28

同时上穿:cross(ma10,ma80) and cross(ma30,ma80)

同时下穿:cross(ma80,ma10) and cross(ma80,ma30)

3楼
fang圆 发表于:2015/9/15 15:46:35
谢谢jinzhe老师! 请帮我修改一下下面这串公式中的错误位置



ma3:=ma(c,3);
ma10:=ma(c,10);
ma60:=ma(c,60);

 
 
 if cross(ma3,ma60)and cross(ma10,ma60)then beginif 
    buy(holding=0,1,market);
end
if crosscross(ma60,ma3) and cross(ma60,ma10) then begin
    buyshort(holding=0,1,market);
end
 
if holding>0 and h>enterprice+5 then 多止盈:sell(1,0,market);
if holding>0 and l<enterprice-10 then 多止损:sell(1,0,market);
 
 
if holding<0 and h>enterprice-10 then 空止损:sellshort(1,0,market);
if holding<0 and l<enterprice+5 then 空止盈:sellshort(1,0,market);

4楼
jinzhe 发表于:2015/9/15 15:50:26

ma3:=ma(c,3);
ma10:=ma(c,10);
ma60:=ma(c,60);


 
 
if cross(ma3,ma60)and cross(ma10,ma60)then begin
    buy(holding=0,1,market);
end
if cross(ma60,ma3) and cross(ma60,ma10) then begin
    buyshort(holding=0,1,market);
end
 
if holding>0 and h>enterprice+5 then 多止盈:sell(1,0,market);
if holding>0 and l<enterprice-10 then 多止损:sell(1,0,market);
 
 
if holding<0 and h>enterprice-10 then 空止损:sellshort(1,0,market);
if holding<0 and l<enterprice+5 then 空止盈:sellshort(1,0,market);

5楼
fang圆 发表于:2015/9/15 17:13:08
谢了

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


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