以下是咱们来个【看图说话】反正放假有的是时间.大家来看看到底那个图好用
我用【拿来主义】编辑几个关于【箱体主图】的公式.又不能一块拿来发表所有源码.因为有不少本来就是别人的创作吗!,所以我先发表几个图给大家.【看图说话】看看还是那个更好一些.凡是都不会【完满无缺】百里挑一总可以把吧-------------请大家参与发表各自己见. 慢慢来. 需要那个源码我会发表的----------------
我到是认为【20天箱体】的毛病就是箱体天天变.不能与周K线.月K线挂钩.不能对比. 这仅仅是一家之见.起一个【抛砖引玉】的作用而已.请各抒己见. 充分听取大家意见后 我一定有源码可发的--------------告诉你个小秘密我这次还真的没使用【ZIG这个未来函数】-------
---------请注意公式里 【pk】是参数 PK:【3,100,12 】填入参数表格里即可------------------
我现在使用的高低转折线公式如下,也是未来函数但是不同于GIG没有涨幅限制.【BACKSET】是准未来函数这一段也可以用在插入单独使用于其他主图里 请你参考----------
----------------{最高点或最低点时的转折线,PK的参数可调}---------------------------------------------------------------------------------------
DRAWTEXT(CURRBARSCOUNT=16 ,HHV(H,YEAR)*0.93,STRCAT(STRCAT('转折线参数,PK=【',VAR2STR(PK,0)),'】')),COLOR00FFFF;
A1:=REF(C,PK)=HHV(C,2*PK+1); B1:=FILTER(A1,PK); C1:=BACKSET(B1,PK+1); HD:=FILTER(C1,PK);
A2:=REF(C,PK)=LLV(C,2*PK+1); B2:=FILTER(A2,PK); C2:=BACKSET(B2,PK+1); LD:=FILTER(C2,PK);
DRAWLINE(HD,H,LD,L,0),COLORFF9900,LINETHICK2;
DRAWLINE(LD,L,HD,H,0),COLOR0000FF,LINETHICK2;
DRAWTEXT(CROSS(HD,LD),H*1.07,'↙★卖'),COLOR00FF00;
DRAWTEXT(CROSS(LD,HD),L*0.93,'↖★买'),COLOR0000FF;
STICKLINE(CROSS(HD,LD),H*1.008,H*1.1,0.6,0),COLOR00FF00;
STICKLINE(CROSS(LD,HD),L*0.992,L*0.9,0.6,0),COLOR0000FF;
-----------------------------------------------------------------------------------------------------------------------------------------
-----------源码分别在【一楼】,【19楼】,【21楼】请不要错过机会.不同公式各有所长.我发源码不用评价不扣分. 但是希望【你勤快点不要拿了就走】.费费劲给【评分】就好.又不需要你出理想币何乐而不为呢.我还是谢谢你的支持-------
这是【20天的箱体图A】的公式源码.我是从【箱体主图“大爱山东人版】拿来编辑的 在此对原创一并谢谢,再次谢谢【冷妞妞】的辛苦编辑和介绍给大家----那里不当竟管删除.你需要什么就保留什么.
DRAWGBK(O>C,RGB(0,30,0),RGB(0,0,40),0,'01',0); {背景不要可删除}
{均线未来函数的买卖通道}
ZK1:(XMA(XMA(H,21),34)-XMA(XMA(L,21),34))*1+XMA(XMA(H,30),30),DOTLINE,COLORWHITE;
ZD1:XMA(XMA(L,21),34)-(XMA(XMA(H,21),34)-XMA(XMA(L,30),30))*1,DOTLINE,COLORWHITE;
BS:(XMA(XMA(H,55),76)-XMA(XMA(L,55),76))*2.2+XMA(XMA(H,60),60),DOTLINE,COLORRED;
BD:XMA(XMA(L,55),76)-(XMA(XMA(H,55),76)-XMA(XMA(L,60),60))*2.8,DOTLINE,COLORGREEN;
DRAWTEXT(ISLASTBAR,ZK1,STRCAT(' ←【卖出】= ',CON2STR(ZK1,2))),COLOR00FFFF;
DRAWTEXT(ISLASTBAR,ZD1,STRCAT(' ←【买入】= ',CON2STR(ZD1,2))),COLORWHITE;
DRAWTEXT(ISLASTBAR,BS,STRCAT(' ←【顶部】= ',CON2STR(BS,2))),COLOR0044FF;
DRAWTEXT(ISLASTBAR,BD,STRCAT(' ←【底部】= ',CON2STR(BD,2))),COLOR00FF00;
DRAWBAND(BS,RGB(0,0,200),ZK1,RGB(0,0,255));
DRAWBAND(ZK1,RGB(80,50,0),ZD1,RGB(80,50,0));
DRAWBAND(ZD1,RGB(15,25,15),BD,RGB(25,45,25));
(XMA(XMA(H,30),30)-XMA(XMA(L,30),30))*1+XMA(XMA(H,30),30),DOTLINE,COLORWHITE;
XMA(XMA(L,30),30)-(XMA(XMA(H,30),30)-XMA(XMA(L,30),30))*1,DOTLINE,COLORWHITE;
(XMA(XMA(H,60),60)-XMA(XMA(L,60),60))*2.2+XMA(XMA(H,60),60),DOTLINE,COLORRED;
XMA(XMA(L,60),60)-(XMA(XMA(H,60),60)-XMA(XMA(L,60),60))*2.8,DOTLINE,COLORGREEN;
HH:=FINDHIGH(H,0,20,1);
LL:=FINDLOW(L,0,20,1);
HH1:=FINDHIGH(H,20,20,1);
LL1:=FINDLOW(L,20,20,1);
HH2:=FINDHIGH(H,40,20,1);
LL2:=FINDLOW(L,40,20,1);
HH3:=FINDHIGH(H,60,20,1);
LL3:=FINDLOW(L,60,20,1);
HH4:=FINDHIGH(H,80,20,1);
LL4:=FINDLOW(L,80,20,1);
HH5:=FINDHIGH(H,100,20,1);
LL5:=FINDLOW(L,100,20,1);
STICKLINE(CURRBARSCOUNT<20 AND CURRBARSCOUNT>1 ,CONST(HH),CONST(HH),8,0)COLOR0000FF;
STICKLINE(CURRBARSCOUNT<20 AND CURRBARSCOUNT>1 ,CONST(LL),CONST(LL),8,0)COLOR00FF00;
STICKLINE(CURRBARSCOUNT<20 AND CURRBARSCOUNT>1 ,(CONST(HH)+CONST(LL))/2,(CONST(HH)+CONST(LL))/2,8,-1)COLOR00FFFF;
STICKLINE(CURRBARSCOUNT=20 OR CURRBARSCOUNT=1 ,CONST(HH),CONST(LL),0,0)COLOR00FFFF;
STICKLINE(CURRBARSCOUNT<40 AND CURRBARSCOUNT>21 ,CONST(HH1),CONST(HH1),8,0)COLOR0000FF;
STICKLINE(CURRBARSCOUNT<40 AND CURRBARSCOUNT>21,CONST(LL1),CONST(LL1),8,0)COLOR00FF00;
STICKLINE(CURRBARSCOUNT<40 AND CURRBARSCOUNT>21 ,(CONST(HH1)+CONST(LL1))/2,(CONST(HH1)+CONST(LL1))/2,8,-1)COLOR00FFFF;
STICKLINE(CURRBARSCOUNT=40 OR CURRBARSCOUNT=21 ,CONST(HH1),CONST(LL1),0,0)COLOR00FFFF;
STICKLINE(CURRBARSCOUNT<60 AND CURRBARSCOUNT>41,CONST(HH2),CONST(HH2),8,0)COLOR0000FF;
STICKLINE(CURRBARSCOUNT<60 AND CURRBARSCOUNT>41,CONST(LL2),CONST(LL2),8,0)COLOR00FF00;
STICKLINE(CURRBARSCOUNT<60 AND CURRBARSCOUNT>41 ,(CONST(HH2)+CONST(LL2))/2,(CONST(HH2)+CONST(LL2))/2,8,-1)COLOR00FFFF;
STICKLINE(CURRBARSCOUNT=60 OR CURRBARSCOUNT=41,CONST(HH2),CONST(LL2),0,0)COLOR00FFFF;
STICKLINE(CURRBARSCOUNT<80 AND CURRBARSCOUNT>61,CONST(HH3),CONST(HH3),8,0)COLOR0000FF;
STICKLINE(CURRBARSCOUNT<80 AND CURRBARSCOUNT>61,CONST(LL3),CONST(LL3),8,0)COLORYELLOW;
STICKLINE(CURRBARSCOUNT<80 AND CURRBARSCOUNT>61 ,(CONST(HH3)+CONST(LL3))/2,(CONST(HH3)+CONST(LL3))/2,8,-1)COLOR00FFFF;
STICKLINE(CURRBARSCOUNT=80 OR CURRBARSCOUNT=61,CONST(HH3),CONST(LL3),0,0)COLOR00FFFF;
STICKLINE(CURRBARSCOUNT<100 AND CURRBARSCOUNT>81,CONST(HH4),CONST(HH4),8,0)COLOR0000FF;
STICKLINE(CURRBARSCOUNT<100 AND CURRBARSCOUNT>81,CONST(LL4),CONST(LL4),8,0)COLOR00FF00;
STICKLINE(CURRBARSCOUNT<100 AND CURRBARSCOUNT>81 ,(CONST(HH4)+CONST(LL4))/2,(CONST(HH4)+CONST(LL4))/2,8,-1)COLOR00FFFF;
STICKLINE(CURRBARSCOUNT=100 OR CURRBARSCOUNT=81,CONST(HH4),CONST(LL4),0,0)COLOR00FFFF;
STICKLINE(CURRBARSCOUNT<120 AND CURRBARSCOUNT>101,CONST(HH5),CONST(HH5),8,0)COLOR0000FF;
STICKLINE(CURRBARSCOUNT<120 AND CURRBARSCOUNT>101,CONST(LL5),CONST(LL5),8,0)COLOR00FF00;
STICKLINE(CURRBARSCOUNT<120 AND CURRBARSCOUNT>101 ,(CONST(HH5)+CONST(LL5))/2,(CONST(HH5)+CONST(LL5))/2,8,-1)COLOR00FFFF;
STICKLINE(CURRBARSCOUNT=120 OR CURRBARSCOUNT=101,CONST(HH5),CONST(LL5),0,0)COLOR00FFFF;
LHK:=LLV(L,0)*1.4;
LLK:=LLV(L,0)*1.3;
DRAWTEXT(CURRBARSCOUNT=12 ,LHK,STRCAT(STRCAT('最高价:',VAR2STR(HH,2)),'元')),COLOR0099FF;
DRAWTEXT(CURRBARSCOUNT=12 ,LLK,STRCAT(STRCAT('最低价:',VAR2STR(LL,2)),'元')),COLOR00FF00;
DRAWTEXT(CURRBARSCOUNT=12 ,LLK*0.92,STRCAT(STRCAT('高低差:',VAR2STR(HH-LL,2)),'元')),COLOR00FFFF;
DRAWTEXT(CURRBARSCOUNT=32 ,LHK,STRCAT(STRCAT('最高价:',VAR2STR(HH1,2)),'元')),COLOR0099FF;
DRAWTEXT(CURRBARSCOUNT=32 ,LLK,STRCAT(STRCAT('最低价:',VAR2STR(LL1,2)),'元')),COLOR00FF00;
DRAWTEXT(CURRBARSCOUNT=32 ,LLK*0.92,STRCAT(STRCAT('高低差:',VAR2STR(HH1-LL1,2)),'元')),COLOR00FFFF;
DRAWTEXT(CURRBARSCOUNT=52 ,LHK,STRCAT(STRCAT('最高价:',VAR2STR(HH2,2)),'元')),COLOR0099FF;
DRAWTEXT(CURRBARSCOUNT=52 ,LLK,STRCAT(STRCAT('最低价:',VAR2STR(LL2,2)),'元')),COLOR00FF00;
DRAWTEXT(CURRBARSCOUNT=52 ,LLK*0.92,STRCAT(STRCAT('高低差:',VAR2STR(HH2-LL2,2)),'元')),COLOR00FFFF;
DRAWTEXT(CURRBARSCOUNT=72 ,LHK,STRCAT(STRCAT('最高价:',VAR2STR(HH3,2)),'元')),COLOR0099FF;
DRAWTEXT(CURRBARSCOUNT=72 ,LLK,STRCAT(STRCAT('最低价:',VAR2STR(LL3,2)),'元')),COLOR00FF00;
DRAWTEXT(CURRBARSCOUNT=72 ,LLK*0.92,STRCAT(STRCAT('高低差:',VAR2STR(HH3-LL3,2)),'元')),COLOR00FFFF;
DRAWTEXT(CURRBARSCOUNT=92 ,LHK,STRCAT(STRCAT('最高价:',VAR2STR(HH4,2)),'元')),COLOR0099FF;
DRAWTEXT(CURRBARSCOUNT=92 ,LLK,STRCAT(STRCAT('最低价:',VAR2STR(LL4,2)),'元')),COLOR00FF00;
DRAWTEXT(CURRBARSCOUNT=92 ,LLK*0.92,STRCAT(STRCAT('高低差:',VAR2STR(HH4-LL4,2)),'元')),COLOR00FFFF;
DRAWTEXT(CURRBARSCOUNT=112 ,LHK,STRCAT(STRCAT('最高价:',VAR2STR(HH5,2)),'元')),COLOR0099FF;
DRAWTEXT(CURRBARSCOUNT=112 ,LLK,STRCAT(STRCAT('最低价:',VAR2STR(LL5,2)),'元')),COLOR00FF00;
DRAWTEXT(CURRBARSCOUNT=112 ,LLK*0.92,STRCAT(STRCAT('高低差:',VAR2STR(HH5-LL5,2)),'元')),COLOR00FFFF;
DRAWTEXT(ISLASTBAR,HH,STRCAT('↙H=',CON2STR(HH,2))),COLOR0099FF;
DRAWTEXT(ISLASTBAR,(HH+LL)/2,STRCAT('↙中=',CON2STR((HH+LL)/2,2))),COLOR00FFFF;
DRAWTEXT(ISLASTBAR,LL,STRCAT('↙L=',CON2STR(LL,2))),COLOR00FF00;
STICKLINE(C>REF(C,1),H,L,0,0),COLOR0099FF;
STICKLINE(C>REF(C,1),C,O,3.2,0),COLOR0000AA;
STICKLINE(C>REF(C,1),C,O,2.7,0),COLOR0000DD;
STICKLINE(C>REF(C,1),C,O,2.1,0),COLOR0022FF;
STICKLINE(C>REF(C,1),C,O,1.5,0),COLOR0066FF;
STICKLINE(C>REF(C,1),C,O,0.9,0),COLOR0099FF;
STICKLINE(C>REF(C,1),C,O,0.3,0),COLOR00DDFF;
STICKLINE(C<REF(C,1),H,L,0,1),COLORFF8800;
STICKLINE(C<REF(C,1),C,O,3.2,0),COLOR990000;
STICKLINE(C<REF(C,1),C,O,2.7,0),COLORCC0000;
STICKLINE(C<REF(C,1),C,O,2.1,0),COLORFF4400;
STICKLINE(C<REF(C,1),C,O,1.5,0),COLORFF8800;
STICKLINE(C<REF(C,1),C,O,0.9,0),COLORFFCC00;
STICKLINE(C<REF(C,1),C,O,0.3,0),COLORFFDD00;
STICKLINE(C=REF(C,1),H,L,0,1),COLORFFFFFF;
STICKLINE(C=REF(C,1),C,O,3.2,0),COLOR555555;
STICKLINE(C=REF(C,1),C,O,2.7,0),COLOR777777;
STICKLINE(C=REF(C,1),C,O,2.1,0),COLOR999999;
STICKLINE(C=REF(C,1),C,O,1.5,0),COLORBBBBBB;
STICKLINE(C=REF(C,1),C,O,0.9,0),COLORDDDDDD;
STICKLINE(C=REF(C,1),C,O,0.3,0),COLORFFFFFF;
HD:DRAWLINE(H>=HHV(H,10),H,L<=LLV(L,10),L,0),COLOR00FF00,LINETHICK2;
LD:DRAWLINE(L<=LLV(L,10),L,H>=HHV(H,10),H,0),COLOR0000FF,LINETHICK2;