首页 > > 详细

开多信号的处理方法、代写期货选股公式、公式选股代做、代写期货选股公式、

源码解析理论:
输出INPUT:CANG1(1,0,10,1),CANG2(1,0,10,1)
输出VARIABLE:CC1=0,CC2=0
反手HI赋值:1日前的10日内最高价的最高值
LO赋值:1日前的10日内最低价的最低值
BEGINPC赋值:HOLDING和0的较大值和CANG1的较小值
KC赋值:CANG1-PC
条件判断 PC>0 THEN 平仓卖出
条件判断 KC>0 THEN 平仓买入
CC1赋值:0
BEGINPC赋值:HOLDING和0的较小值的绝对值和CANG1的较小值
KC赋值:CANG1-PC
条件判断 PC>0 THEN 开仓卖出
条件判断 KC>0 THEN 开仓买入
CC1赋值:0
BEGINPC赋值:HOLDING和0的较小值的绝对值和CANG1的较小值
KC赋值:CANG1-PC
条件判断 PC>0 THEN 开仓卖出
条件判断 KC>0 THEN 开仓买入
CC1赋值:1
BEGINPC赋值:HOLDING和0的较大值和CANG1的较小值
KC赋值:CANG1-PC
条件判断 PC>0 THEN 平仓卖出
条件判断 KC>0 THEN 平仓买入
CC1赋值:-1
反手HI赋值:1日前的20日内最高价的最高值
LO赋值:1日前的20日内最低价的最低值
BEGINPC赋值:HOLDING和0的较大值和CANG2的较小值
KC赋值:CANG2-PC
条件判断 PC>0 THEN 平仓卖出
条件判断 KC>0 THEN 平仓买入
CC2赋值:0
BEGINPC赋值:HOLDING和0的较小值的绝对值和CANG2的较小值
KC赋值:CANG2-PC
条件判断 PC>0 THEN 开仓卖出
条件判断 KC>0 THEN 开仓买入
CC2赋值:0
BEGINPC赋值:HOLDING和0的较小值的绝对值和CANG2的较小值
KC赋值:CANG2-PC
条件判断 PC>0 THEN 开仓卖出
条件判断 KC>0 THEN 开仓买入
CC2赋值:1
BEGINPC赋值:HOLDING和0的较大值和CANG2的较小值
KC赋值:CANG2-PC
条件判断 PC>0 THEN 平仓卖出
条件判断 KC>0 THEN 平仓买入
CC2赋值:-1
输出END/////////////////////////////////以上是模型2//有更多的模型,往后面添加即可如果各个模型都是K线走完模式的,可以这样组合更加方便VARIABLE:LEE=0
KC1赋值:LEE和0的较大值-HOLDING和0的较大值
KC2赋值:LEE和0的较小值-HOLDING和0的较小值
条件判断 KC10.5 THEN 开仓卖出
条件判断 KC1>0.5 THEN 开仓买入
条件判断 KC21日前的收盘价 AND 1日前的收盘价>2日前的收盘价
SELLCOND1赋值:收盘价收盘价的20日简单移动平均
SELLCOND2赋值:收盘价的5日简单移动平均收盘价的30日简单移动平均
SELLCOND3赋值:收盘价的10日简单移动平均0 and l0 then sell(1,pc,limitr,min(o,lo-0.2)-0.6);
if kc>0 then buyshort(1,kc,limitr,min(o,lo-0.2)-0.6);
cc1:=0;
end
if cc1hi then begin
pc:=min(abs(min(holding,0)),cang1);
kc:=cang1-pc;
if pc>0 then sellshort(1,pc,limitr,max(o,hi+0.2)+0.6);
if kc>0 then buy(1,kc,limitr,max(o,hi+0.2)+0.6);
cc1:=0;
end
if cc1=0 and h>hi then begin
pc:=min(abs(min(holding,0)),cang1);
kc:=cang1-pc;
if pc>0 then sellshort(1,pc,limitr,max(o,hi+0.2)+0.6);
if kc>0 then buy(1,kc,limitr,max(o,hi+0.2)+0.6);
cc1:=1;
end
if cc1=0 and l0 then sell(1,pc,limitr,min(o,lo-0.2)-0.6);
if kc>0 then buyshort(1,kc,limitr,min(o,lo-0.2)-0.6);
cc1:=-1;
end
/////////////////////////////////以上是模型1
/////////////////////////////////模型2mdash;
mdash;
20周期反手
hi:=ref(hhv(h,20),1);
lo:=ref(llv(l,20),1);
if cc2>0 and l0 then sell(1,pc,limitr,min(o,lo-0.2)-0.6);
if kc>0 then buyshort(1,kc,limitr,min(o,lo-0.2)-0.6);
cc2:=0;
end
if cc2hi then begin
pc:=min(abs(min(holding,0)),cang2);
kc:=cang2-pc;
if pc>0 then sellshort(1,pc,limitr,max(o,hi+0.2)+0.6);
if kc>0 then buy(1,kc,limitr,max(o,hi+0.2)+0.6);
cc2:=0;
end
if cc2=0 and h>hi then begin
pc:=min(abs(min(holding,0)),cang2);
kc:=cang2-pc;
if pc>0 then sellshort(1,pc,limitr,max(o,hi+0.2)+0.6);
if kc>0 then buy(1,kc,limitr,max(o,hi+0.2)+0.6);
cc2:=1;
end
if cc2=0 and l0 then sell(1,pc,limitr,min(o,lo-0.2)-0.6);
if kc>0 then buyshort(1,kc,limitr,min(o,lo-0.2)-0.6);
cc2:=-1;
end
/////////////////////////////////以上是模型2
//有更多的模型,往后面添加即可
如果各个模型都是K线走完模式的,可以这样组合更加方便
variable:lee=0;
kc1:=max(lee,0)-max(holding,0);
kc2:=min(lee,0)-min(holding,0);
if kc10.5 then sellshort(1,kc2,limitr,open);
if kc1>0.5 then buy(1,kc1,limitr,open);
if kc2ref(c,1) and ref(c,1)>ref(c,2);
sellcond1:=c0 and sellcond1 then cc1:=0;
if cc1ma(c,20);
sellcond2:=ma(c,5)0 and sellcond2 then cc2:=0;
if cc2ma(c,30);
sellcond3:=ma(c,10)0 and sellcond3 then cc3:=0;
if cc3<0 and buycond3then cc3:=0;
if cc3=0 and buycond3then cc3:=1;
if cc3=0 and sellcond3 then cc3:=-1;
lee:=1*cc1+1*cc2+1*cc3;
//每个模型乘以各自的下单系数





 

联系我们 - QQ: 88652583
© 2014 www.93stock.com
代写选股公式网!
声明:警惕假冒分子冒充本站提供证券咨询服务,选股公式网为非证券咨询机构,本站不提供有关股评、投资分析报告、股市预测,证券咨询等服务。本站仅提供股票、期货、黄金、外汇的软件技术交流与分享。本站文章为互联网文章,其仅供参考,并不构成投资建议。