您现在的位置:程序化交易>> 股票公式>> 大智慧>> 大智慧公式>>正文内容

资金明细图指标 公式 源码[大智慧公式]

指标公式源码分析及使用说明:

 

这些变量和函数涉及到对交易量和主力资金流入的统计和分类。让我为你总结一下编程思路及操作建议:
 
 
 总体编程思路总结
 
1. 数据获取和预处理:
   - 使用REF函数获取历史交易日的成交额,并将其转换为亿的单位。
   - 使用BIGORDER函数计算不同档位的大单占比,并结合当前交易日的成交额进行计算。
 
2. 指标计算和逻辑设置:
   - 定义和计算每个变量,确保理解和正确使用函数(如REF、BIGORDER)。
   - 根据具体需求对成交额和大单占比进行分类和统计。
 
3. 结果展示和应用:
   - 结果如主力流入净量等可以用于生成图表或者作为交易决策的依据。
   - 使用DRAWTEXTABS函数来标示统计分类的标题和相关信息。
 
 操作建议
 
- 参数优化和回测:
  - 在实际应用前,建议优化和回测参数,例如调整REF和BIGORDER函数中的档位参数,以优化指标的效果和准确性。
 
- 数据源和周期选择:
  - 确保使用正确的数据源(如日线、分钟线等)和合适的周期来计算指标,以适应你的交易频率和策略需求。
 
- 技术实现:
  - 使用适当的编程语言或平台实现你的交易策略,并确保计算的准确性和实时性。
 
- 风险管理:
  - 在应用指标时,考虑风险管理策略,例如设置止损和止盈点,以控制潜在的损失并最大化盈利潜力。
 
综上所述,这些步骤和建议可以帮助你理解和实现给定的指标公式,从而应用于实际的金融市场分析和交易决策中。

 

源码:

 

cxh0:=REF(AMOUNT,3)/10000/10000;
cxh1:=REF(AMOUNT,4)/10000/10000;
cxh2:=REF(AMOUNT,2)/10000/10000;
cxh3:=REF(AMOUNT,1)/10000/10000;
cxh4:=AMOUNT/10000/10000;
DRAWTEXTABS(16,8,'统计分类'),COLORWHITE;
cxh5:=AMOUNT * BIGORDER(1,3);
cxh6:=AMOUNT * (BIGORDER(1,2) - BIGORDER(1,3));
cxh7:=AMOUNT * (BIGORDER(1,1) - BIGORDER(1,2));
cxh8:=AMOUNT * (1 - BIGORDER(1,1));
cxh9:=cxh5 + cxh6 + cxh7 + cxh8;
cxh10:=AMOUNT * BIGORDER(2,3);
cxh11:=AMOUNT * (BIGORDER(2,2) - BIGORDER(2,3));
cxh12:=AMOUNT * (BIGORDER(2,1) - BIGORDER(2,2));
cxh13:=AMOUNT * (1 - BIGORDER(2,1));
cxh14:=(BIGORDER(1,2) - BIGORDER(2,2)) * VOL/CAPITAL * 100;
cxh15:=BIGORDER(1,2) * AMOUNT/10000;
cxh16:=BIGORDER(2,2) * AMOUNT/10000;
主力流入净量:cxh15 - cxh16,LINETHICK0,COLOR00AAFF;
cxh17:=REF(cxh15,0);
cxh18:=REF(cxh15,1);
cxh19:=REF(cxh15,2);
cxh20:=REF(cxh15,3);
cxh21:=REF(cxh15,5);
cxh22:=REF(cxh16,0);
cxh23:=REF(cxh16,1);
cxh24:=REF(cxh16,2);
cxh25:=REF(cxh16,3);
cxh26:=REF(cxh16,4);
DRAWTEXTABS(8,35,'主 力 账 户'),COLORWHITE;
DRAWTEXTABS(8,60,'超 大 账 户'),COLORWHITE;
DRAWTEXTABS(8,85,'大 户 账 户'),COLORWHITE;
DRAWTEXTABS(8,110,'中 户 账 户'),COLORWHITE;
DRAWTEXTABS(8,135,'散 户 账 户'),COLORWHITE;
DRAWTEXTABS(5,165,'股价涨幅(%)'),COLORWHITE;
DRAWTEXTABS(16,190,'' + STKNAME + ''),COLORWHITE;
DRAWTEXTABS(78,190,'' + STKLABEL + ''),COLORRED;
cxh27:=BKNAME;
cxh28:=' 板块类别: ' + cxh27;
DRAWTEXTABS(140,190,cxh28),COLORWHITE;
DRAWTEXTABS(515,60,'' + SUM(REF(cxh5 - cxh10,0)/10000,2) + ''),COLORWHITE;
DRAWTEXTABS(625,60,'' + SUM(REF(cxh5 - cxh10,0)/10000,3) + ''),COLORWHITE;
DRAWTEXTABS(735,60,'' + SUM(REF(cxh5 - cxh10,0)/10000,4) + ''),COLORWHITE;
DRAWTEXTABS(845,60,'' + SUM(REF(cxh5 - cxh10,0)/10000,5) + ''),COLORWHITE;
DRAWTEXTABS(515,85,'' + SUM(REF(cxh6 - cxh11,0)/10000,2) + ''),COLORWHITE;
DRAWTEXTABS(625,85,'' + SUM(REF(cxh6 - cxh11,0)/10000,3) + ''),COLORWHITE;
DRAWTEXTABS(735,85,'' + SUM(REF(cxh6 - cxh11,0)/10000,4) + ''),COLORWHITE;
DRAWTEXTABS(845,85,'' + SUM(REF(cxh6 - cxh11,0)/10000,5) + ''),COLORWHITE;
DRAWTEXTABS(515,110,'' + SUM(REF(cxh7 - cxh12,0)/10000,2) + ''),COLORWHITE;
DRAWTEXTABS(625,110,'' + SUM(REF(cxh7 - cxh12,0)/10000,3) + ''),COLORWHITE;
DRAWTEXTABS(735,110,'' + SUM(REF(cxh7 - cxh12,0)/10000,4) + ''),COLORWHITE;
DRAWTEXTABS(845,110,'' + SUM(REF(cxh7 - cxh12,0)/10000,5) + ''),COLORWHITE;
DRAWTEXTABS(515,135,'' + SUM(REF(cxh8 - cxh13,0)/10000,2) + ''),COLORWHITE;
DRAWTEXTABS(625,135,'' + SUM(REF(cxh8 - cxh13,0)/10000,3) + ''),COLORWHITE;
DRAWTEXTABS(735,135,'' + SUM(REF(cxh8 - cxh13,0)/10000,4) + ''),COLORWHITE;
DRAWTEXTABS(845,135,'' + SUM(REF(cxh8 - cxh13,0)/10000,5) + ''),COLORWHITE;
DRAWTEXTABS(515,35,'' + SUM(REF(cxh17 - cxh22,0),2) + ''),COLORWHITE;
DRAWTEXTABS(625,35,'' + SUM(REF(cxh17 - cxh22,0),3) + ''),COLORWHITE;
DRAWTEXTABS(735,35,'' + SUM(REF(cxh17 - cxh22,0),4) + ''),COLORWHITE;
DRAWTEXTABS(845,35,'' + SUM(REF(cxh17 - cxh22,0),5) + ''),COLORWHITE;
DRAWTEXTABS(485,8,'连续2日总计(万元)'),COLOR088FFF;
DRAWTEXTABS(705,8,'连续4日总计(万元)'),COLOR088FFF;
DRAWTEXTABS(595,8,'连续3日总计(万元)'),COLOR088FFF;
DRAWTEXTABS(815,8,'连续5日总计(万元)'),COLOR088FFF;
DRAWTEXTABS(502,163,'2日:' + SUM((CLOSE - REF(CLOSE,1))/REF(CLOSE,1) * 100,2) + '%'),COLORWHITE;
DRAWTEXTABS(612,163,'3日:' + SUM((CLOSE - REF(CLOSE,1))/REF(CLOSE,1) * 100,3) + '%'),COLORWHITE;
DRAWTEXTABS(722,163,'4日:' + SUM((CLOSE - REF(CLOSE,1))/REF(CLOSE,1) * 100,4) + '%'),COLORWHITE;
DRAWTEXTABS(832,163,'5日:' + SUM((CLOSE - REF(CLOSE,1))/REF(CLOSE,1) * 100,5) + '%'),COLORWHITE;
DRAWTEXTABS(385,60,'超大:' + NUMTOSTRN(REF(cxh5 - cxh10,0)/10000,0)),COLORWHITE;
DRAWTEXTABS(320,60,NUMTOSTRN(REF(cxh5 - cxh10,1)/10000,0)),COLORWHITE;
DRAWTEXTABS(220,60,NUMTOSTRN(REF(cxh5 - cxh10,2)/10000,0)),COLORWHITE;
DRAWTEXTABS(120,60,NUMTOSTRN(REF(cxh5 - cxh10,3)/10000,0)),COLORWHITE;
DRAWTEXTABS(385,85,'大户:' + NUMTOSTRN(REF(cxh6 - cxh11,0)/10000,0)),COLORWHITE;
DRAWTEXTABS(320,85,NUMTOSTRN(REF(cxh6 - cxh11,1)/10000,0)),COLORWHITE;
DRAWTEXTABS(220,85,NUMTOSTRN(REF(cxh6 - cxh11,2)/10000,0)),COLORWHITE;
DRAWTEXTABS(120,85,NUMTOSTRN(REF(cxh6 - cxh11,3)/10000,0)),COLORWHITE;
DRAWTEXTABS(385,110,'中户:' + NUMTOSTRN(REF(cxh7 - cxh12,0)/10000,0)),COLORWHITE;
DRAWTEXTABS(320,110,NUMTOSTRN(REF(cxh7 - cxh12,1)/10000,0)),COLORWHITE;
DRAWTEXTABS(220,110,NUMTOSTRN(REF(cxh7 - cxh12,2)/10000,0)),COLORWHITE;
DRAWTEXTABS(120,110,NUMTOSTRN(REF(cxh7 - cxh12,3)/10000,0)),COLORWHITE;
DRAWTEXTABS(385,135,'小股民:' + NUMTOSTRN(REF(cxh8 - cxh13,0)/10000,0)),COLORWHITE;
DRAWTEXTABS(320,135,NUMTOSTRN(REF(cxh8 - cxh13,1)/10000,0)),COLORWHITE;
DRAWTEXTABS(220,135,NUMTOSTRN(REF(cxh8 - cxh13,2)/10000,0)),COLORWHITE;
DRAWTEXTABS(120,135,NUMTOSTRN(REF(cxh8 - cxh13,3)/10000,0)),COLORWHITE;
DRAWTEXTABS(385,35,'主力:' + NUMTOSTRN(cxh17 - cxh22,0)),COLORWHITE;
DRAWTEXTABS(320,35,NUMTOSTRN(cxh18 - cxh23,0)),COLORWHITE;
DRAWTEXTABS(220,35,NUMTOSTRN(cxh19 - cxh24,0)),COLORWHITE;
DRAWTEXTABS(120,35,NUMTOSTRN(cxh20 - cxh25,0)),COLORWHITE;
DRAWTEXTABS(385,163,'涨幅:' + NUMTOSTRN((CLOSE - REF(CLOSE,1))/REF(CLOSE,1) * 100,2) + '%'),COLORWHITE;
DRAWTEXTABS(315,163,NUMTOSTRN((REF(CLOSE,1) - REF(CLOSE,2))/REF(CLOSE,2) * 100,2) + '%'),COLORWHITE;
DRAWTEXTABS(215,163,NUMTOSTRN((REF(CLOSE,2) - REF(CLOSE,3))/REF(CLOSE,3) * 100,2) + '%'),COLORWHITE;
DRAWTEXTABS(115,163,NUMTOSTRN((REF(CLOSE,3) - REF(CLOSE,4))/REF(CLOSE,4) * 100,2) + '%'),COLORWHITE;
DRAWTEXTABS(83,8,'四日前净买(万元)'),COLOR088FFF;
DRAWTEXTABS(188,8,'前日净买(万元)'),COLOR088FFF;
DRAWTEXTABS(289,8,'昨日净买(万元)'),COLOR088FFF;
DRAWTEXTABS(389,8,'今日净买(万元)'),COLOR088FFF;
DRAWGBKLAST(1,STRIP(RGB(0,0,0),RGB(30,40,55),0));
DRAWRECTABS(0,0,920,210,0),COLOR777777;
DRAWRECTABS(79,155,920,185,2301560),COLOR777777;
DRAWRECTABS(0,25,920,156,3614750),COLOR777777;
DRAWRECTABS(0,79,920,105,3939930),COLOR777777;
DRAWRECTABS(379,25,480,156,10330),COLOR777777;
DRAWRECTABS(0,25,80,185,2626650),COLOR777777;
DRAWRECTABS(0,184,920,210,3614750),COLOR777777;
DRAWRECTABS(0,0,80,185,0),COLOR777777;
DRAWRECTABS(0,0,180,185,0),COLOR777777;
DRAWRECTABS(0,0,280,185,0),COLOR777777;
DRAWRECTABS(0,0,380,185,0),COLOR777777;
DRAWRECTABS(0,0,480,185,0),COLOR777777;
DRAWRECTABS(0,0,590,185,0),COLOR777777;
DRAWRECTABS(0,0,700,185,0),COLOR777777;
DRAWRECTABS(0,0,810,185,0),COLOR777777;

 

公式导入教程: 【通达信公式源码导入方法教程】 【同花顺公式源码导入方法教程】 【大智慧新一代公式源码导入方法教程

 

 

有思路,想编写各种指标公式,交易模型,选股公式,还原公式的朋友

可联系技术人员 QQ: 262069696  点击在线交流或微信:cxhjy888 进行 有偿收费 编写!(注:由于人数限制,QQ或微信请选择方便的一个联系我们就行,加好友时请简单备注下您的需求,否则无法通过。谢谢您!)

怎么收费,代编流程等详情请点击查阅!

(注:由于人数限制,QQ或微信请选择方便的一个联系我们就行,加好友时请简单备注下您的需求,否则无法通过。谢谢您!)

 


【字体: 】【打印文章】【查看评论

相关文章

    没有相关内容