股友量 发表于 2022-1-12 23:18

指标编写问答138学习的宝藏

636.问:
if datatype<>0 then begin
drawtext(islastbar,0,'只能运行在分笔周期'),align2;
exit;
end;
fv:=vol;
fc:=close;
fcp:=fc;
a:=sortpos(fcp,0,1,datacount);
fvmax:=0; fvmaxp:=1; fvtemp:=fv];
if datacount>1 then begin
for i=2 to datacount do
if fc]=fc] then fvtemp:=fvtemp+fv]
else begin
   if fvmax<fvtemp then begin
      fvmax:=fvtemp;
      fvmaxp:=i-1;
      end;
      fvtemp:=fv];

    end;
if fvmax<fvtemp then begin
    fvmax:=fvtemp;
    fvmaxp:=i-1;
end;
end;
集聚点:fc];
活跃上限:fc];
用以上公式进行分笔扩展统计然后引用到日线中。
jjl:=SELFDATA(' 集聚点');qys:=SELFDATA('活跃上限');
qyx:=SELFDATA('活跃下限');
STICKLINE(1,qys,qyx,8,1),COLORyellow;
DRAWICON(1,jjl,10)
   我以为,乾坤烛除表达了K线中的最高 最底 开盘 收盘外,还标出量的活跃上限 活跃下限 集聚点 尤其集聚点对以后股价运行颇具意义。以上公式网上得来我在飞狐中几经编辑测试都通不过
   答(绿野浪子):
为了达到最佳效果,必须建扩展数据,但这样公式就只能盘后分析使用。
如要在实盘中使用,扩展数据必须实时更新,但这样软件太占资源,运行速度会很慢,反而不方便看盘。
要在实盘中使用,方便看盘分析,最好用日线数据。
荷蒲的高价公式中就有一个引用日线数据的K线乾坤烛。
   答(abit):
STICKLINE(open>=close ,close ,open,7,0 ),COLORFF2020;
STICKLINE(open>=close ,close ,open,4,0 ),COLORFF2020;
STICKLINE(open>=close ,close ,open,2,0 ),COLORFFFF00;

STICKLINE(close>open,close,open,7 ,0 ),COLOR2020FF;
STICKLINE(close>open,close,open,4 ,0 ),COLORB0B0FF;
STICKLINE(close>open,close,open,2 ,0 ),COLOR00FFFF;

STICKLINE(close>open,open,low,0.5,0 ),COLOR00FFFF;
STICKLINE(close>open,close,HIGH,0.5 ,0 ),COLOR00FFFF;
STICKLINE(open>=close,close,low,0.5 ,0 ),COLORFFFF80;
STICKLINE(open>=close,open,HIGH,0.5 ,0 ),COLORFFFF80;

STICKLINE(close=open AND C>REF(C,1),close,open,7 ,0 ),COLOR2020FF;
STICKLINE(close=open AND C>REF(C,1),close,HIGH,0.5 ,0 ),COLOR2020FF;
STICKLINE(close=open AND C>REF(C,1),open,low,0.5,0 ),COLOR2020FF;

STICKLINE(open>=close ,close ,open,7,0 ),COLORFF2020;
STICKLINE(open>=close ,close ,open,4,0 ),COLORFF2020;
STICKLINE(open>=close ,close ,open,2,0 ),COLORFFFF00;
STICKLINE(close>open,close,open,7 ,0 ),COLOR2020FF;
STICKLINE(close>open,close,open,4 ,0 ),COLORB0B0FF;
STICKLINE(close>open,close,open,2 ,0 ),COLOR00FFFF;
STICKLINE(close>open,open,low,0.5,0 ),COLOR00FFFF;
STICKLINE(close>open,close,HIGH,0.5 ,0 ),COLOR00FFFF;
STICKLINE(open>=close,close,low,0.5 ,0 ),COLORFFFF80;
STICKLINE(open>=close,open,HIGH,0.5 ,0 ),COLORFFFF80;
STICKLINE(close=open AND C>REF(C,1),close,open,7 ,0 ),COLOR2020FF;
STICKLINE(close=open AND C>REF(C,1),close,HIGH,0.5 ,0 ),COLOR2020FF;
STICKLINE(close=open AND C>REF(C,1),open,low,0.5,0 ),COLOR2020FF;
cb:=if(amount/v/100>100,(3*c+2*o+h+l)/7,amount/v/100);

DRAWICON(cb>0,cb,19);

s33060993s 发表于 2022-3-20 15:38

好好学习天天向上
页: [1]
查看完整版本: 指标编写问答138学习的宝藏