现将收集 的 同花源 ◎码集合  惠赠理想同学
不评分、回复者,源码不全,使用无效。仅此告知,勿谓言之不予。呵呵--理想新技术。

主力持仓 TOPWIN
N 1,999,1
IF(PERIODNAME<>"日线")
{
统计:"该指标只在日线周期下有效。";
RETURN;
}
r1:=ZDMR[-1];
r2:=BDMR[-1];
r3:=-ZDMC[-1];
r4:=-BDMC[-1];
x:=(ZDMR+BDMR)/SHGZG*30;
y:=-(ZDMC+BDMC)/SHGZG*30;
x1:=(ZDMR+BDMR)/SHGZG*100;
y1:=-(ZDMC+BDMC)/SHGZG*100;
a1=SUM(x1,0);
b1=SUM(y1,0);
主力持仓:=a1+b1;
r:=((ZDMR[-1]+BDMR[-1])-(ZDMC[-1]+BDMC[-1]))/SHGZG*100;
b:=SUM(r,0);
STICKLINE(x1>0,x+b,b,2),colorred;
STICKLINE(y1<0,b,b+y,2),colorgreen;
IF(ISNULL(r1))
{
  统计:"本指标由同花顺金融研究中心提供,每晚11点后提供当天的数据。";
  RETURN;
}
a=(ZDMR[-1]+BDMR[-1]);
b=(ZDMC[-1]+BDMC[-1]);
a3=SUM(a,n)/1000000;
b3=SUM(b,n)/1000000;
VOL1=SUM(VOL,n)/1000000;
IF(a3>b3)
{
  y=a3-b3;
  z=y/VOL1*100;
  统计:TOSTRING(n,0)+"天机构买入"+TOSTRING(a3,1)+"万手,卖出"+TOSTRING(b3,1)+"万手.净买入"+TOSTRING(y,1)+"万手.占总成交"+TOSTRING(z,1)+"%.";
}
ELSE
{
  y=b3-a3;
  z=y/VOL1*100;
  统计:TOSTRING(n,0)+"天机构买入"+TOSTRING(a3,1)+"万手,卖出"+TOSTRING(b3,1)+"万手.净卖出"+TOSTRING(y,1)+"万手.占总成交"+TOSTRING(z,1)+"%.";
}

主力买卖大单
N 1,100,1
IF(PERIODNAME<>"日线")
{
统计:"该指标只在日线周期下有效。";
RETURN;
}
r1:=ZDMR[-1];
r2:=BDMR[-1];
r3:=-ZDMC[-1];
r4:=-BDMC[-1];
STICKLINE(r2>0,r1,r1+r2,8),color160060;
STICKLINE(r1>0,0,r1,8),color0000ff;
STICKLINE(r3<0,0,r3,8),color00ff00;
STICKLINE(r4<0,r3,r3+r4,8),color166000;
x1:=(ZDMR+BDMR);
y1:=-(ZDMC+BDMC);
a1=MA(x1,n);
b1=MA(y1,n);
净买入:a1+b1;
净买入比值:(a1+b1)/VOL*100;
IF(ISNULL(r1))
{
  统计:"本指标由同花顺金融研究中心提供,每晚11点后提供当天的数据。";
  RETURN;
}
a=(ZDMR[-1]+BDMR[-1]);
b=(ZDMC[-1]+BDMC[-1]);
a3=SUM(a,n)/1000000;
b3=SUM(b,n)/1000000;
VOL1=SUM(VOL,n)/1000000;
IF(a3>b3)
{
  y=a3-b3;
  z=y/VOL1*100;
  统计:TOSTRING(n,0)+"天机构买入"+TOSTRING(a3,1)+"万手,卖出"+TOSTRING(b3,1)+"万手.净买入"+TOSTRING(y,1)+"万手.占总成交"+TOSTRING(z,1)+"%.";
}
ELSE
{
  y=b3-a3;
  z=y/VOL1*100;
  统计:TOSTRING(n,0)+"天机构买入"+TOSTRING(a3,1)+"万手,卖出"+TOSTRING(b3,1)+"万手.净卖出"+TOSTRING(y,1)+"万手.占总成交"+TOSTRING(z,1)+"%.";
}

资金流向
IF(STRFIND(PERIODNAME,"分钟",1)>0)
{
统计:"该指标只在日线、周线、月线、季线和年线周期下有效。";
RETURN;
}
资金流出:-ZJLC[-1];
资金流入:ZJLR[-1];
资金流向:资金流出+资金流入;
IF(ISNULL(资金流出) AND ISNULL(资金流入))
{
  资金流向:"本指标由同花顺金融研究中心提供,晚上提供当天数据。";
  RETURN;
}

机构动向
IF(PERIODNAME<>"日线")
{
当日机构动向:"本指标只适用于日线周期";
RETURN;
}
z:0;
a:=ZDMR[-1]+BDMR[-1];
b:=ZDMC[-1]+BDMC[-1];
bl:=(a-b)/(a+b)*100;
IF(ABS(bl)<30)
当日机构动向:bl;
ELSE
   今日机构动向:bl;

大单净量日线
IF(STRFIND(PERIODNAME,"分钟",1)>0)
{
统计:"该指标只在日线、周线、月线、季线和年线周期下有效。";
RETURN;
}
r:=((ZDMR[-1]+BDMR[-1])-(ZDMC[-1]+BDMC[-1]))/SHGZG*100;
大单净量:r;
STICKLINE(r>0,0,r,8),color0000ff;
STICKLINE(r<0,0,r,8),color00ff00;
r0:=((IF(ISNULL(ZDMR[-1]),0,ZDMR)+IF(ISNULL(BDMR[-1]),0,BDMR))
-(IF(ISNULL(ZDMC[-1]),0,ZDMC)+IF(ISNULL(BDMC[-1]),0,BDMC)))
  /SHGZG*100;
MA5:MA(r0,5);
MA10:MA(r0,10);
MA20:MA(r0,20);
RETURN r0;

上证BBD
大单净差BBD:100*(BIGBUYCOUNT1+WAITBUYCOUNT1-BIGSELLCOUNT1-WAITSELLCOUNT1);
大单净额:BIGBUYMONEY1+WAITBUYMONEY1-BIGSELLMONEY1-WAITSELLMONEY1;
三日BBD:SUM(大单净差BBD,3);
五日BBD:SUM(大单净差BBD,5);
十日BBD:SUM(大单净差BBD,10);

牛市操盘线
RSV=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
a=SMA(RSV,3,1);
b=SMA(a,3,1);
IF(a< 0) a=0;
IF(a> 100) a=100;
IF(b< 0) b=0;
IF(b> 100) b=100;

IsNowBuy:=FALSE;

sBUY:=CLOSE< 1.2*LLV(LOW,7) AND CLOSE> MA(CLOSE,5) AND a> 50 AND CROSS(MA(CLOSE,5),MA(CLOSE,10)); //买入信号
DRAWICON (sBUY,LOW,"buy");

//判断现在是否买入状态
IF(sBuy==TRUE OR IsNowBuy[1]==TRUE)
IsNowBuy:=TRUE;
//

keep=BARSLAST(sBuy == TRUE); //买入多少天了
win5=0;win10=0;win15=0;win20=0;Lose3=0;
CanSell:=CROSS(MA(CLOSE,10),MA(CLOSE,5));
IF(IsNowBuy==TRUE)
{
IF(keep >  1)
{
  pCost = MONEY[keep-1]/VOL[keep-1];
  //5%止盈
  IF(win5[1] != 1 AND HIGH/PCost> 1.05 )
  {
        win5=1;
     DRAWICON(1,HIGH,"master_sell2"," 5%止盈");
     //IsNowBuy=FALSE;
  }
    ELSE
  {
        win5=win5[1];
  }
  //10%止盈
  IF(win10[1] != 1 AND HIGH/PCost> 1.1 )
  {
        win10=1;
     DRAWICON(1,HIGH,"master_sell4"," 10%止盈");
     //IsNowBuy=FALSE;
  }
    ELSE
  {
        win10=win10[1];
  }
    //15%止盈
  IF(win15[1] != 1 AND HIGH/PCost> 1.15 )
  {
        win15=1;
     DRAWICON(1,HIGH,"master_sell5"," 15%止盈");
     //IsNowBuy=FALSE;
  }
    ELSE
  {
        win15=win15[1];
  }
     //5%止损
  IF(Lose3[1] != 1 AND (pCost-CLOSE)/PCost> 0.05)
  {
        Lose3=1;
     DRAWICON(1,HIGH,"master_sell3"," 5%止损");
     IsNowBuy=FALSE;
  }
  ELSE
  {
        Lose3=Lose3[1];
  }
  //卖出
  IF(CanSell==TRUE)
  {
   DRAWICON(1,HIGH,"master_sell1"," 均线卖出");
   IsNowBuy=FALSE;
  }
}
}
 

声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。