UID 2 积分 2892817 威望 1396440 布 龙e币 1496377 刀 在线时间 13326 小时 注册时间 2009-12-3 最后登录 2024-12-26
大智慧天地划线指标公式源码[大智慧公式]
VARA:=(((CLOSE - EMA(CLOSE,13)) / EMA(CLOSE,13)) * (0 - 100));
趋势线:EMA(((VARA/10)+EMA(CLOSE,10)),3);
VARB:=(OPEN+HIGH+LOW)/3;
VARC:=EMA(VARB,4);
行情线:=VARC;
BUY11:=IF(CROSS(行情线,趋势线) OR (ref(行情线,1)=ref(趋势线,1) AND 行情线>趋势线),1,0);
DRAWTEXT(CROSS(行情线,趋势线) OR (ref(行情线,1)=ref(趋势线,1) AND 行情线>趋势线),LOW*0.98,'▲'),COLOR0000FF;
DRAWTEXT(CROSS(行情线,趋势线) OR (ref(行情线,1)=ref(趋势线,1) AND 行情线>趋势线),LOW*0.975,'∣'),COLOR0000FF;
DRAWTEXT(CROSS(行情线,趋势线) OR (ref(行情线,1)=ref(趋势线,1) AND 行情线>趋势线),LOW*0.975,'‖'),COLOR0000FF;
DRAWTEXT(CROSS(行情线,趋势线) OR (ref(行情线,1)=ref(趋势线,1) AND 行情线>趋势线),LOW*0.97,'∣'),COLOR0000FF;
DRAWTEXT(CROSS(行情线,趋势线) OR (ref(行情线,1)=ref(趋势线,1) AND 行情线>趋势线),LOW*0.97,'‖'),COLOR0000FF;
DRAWTEXT(CROSS(行情线,趋势线) OR (ref(行情线,1)=ref(趋势线,1) AND 行情线>趋势线),LOW*0.965,'∣'),COLOR0000FF;
DRAWTEXT(CROSS(行情线,趋势线) OR (ref(行情线,1)=ref(趋势线,1) AND 行情线>趋势线),LOW*0.965,'‖'),COLOR0000FF;
DRAWTEXT(CROSS(趋势线,行情线) OR (ref(行情线,1)=ref(趋势线,1) AND 行情线<趋势线),HIGH*1.02,'▼'),COLOR00FF00;
DRAWTEXT(CROSS(趋势线,行情线) OR (ref(行情线,1)=ref(趋势线,1) AND 行情线<趋势线),HIGH*1.025,'∣'),COLOR00FF00;
DRAWTEXT(CROSS(趋势线,行情线) OR (ref(行情线,1)=ref(趋势线,1) AND 行情线<趋势线),HIGH*1.025,'‖'),COLOR00FF00;
DRAWTEXT(CROSS(趋势线,行情线) OR (ref(行情线,1)=ref(趋势线,1) AND 行情线<趋势线),HIGH*1.03,'∣'),COLOR00FF00;
DRAWTEXT(CROSS(趋势线,行情线) OR (ref(行情线,1)=ref(趋势线,1) AND 行情线<趋势线),HIGH*1.03,'‖'),COLOR00FF00;
DRAWTEXT(CROSS(趋势线,行情线) OR (ref(行情线,1)=ref(趋势线,1) AND 行情线<趋势线),HIGH*1.035,'∣'),COLOR00FF00;
DRAWTEXT(CROSS(趋势线,行情线) OR (ref(行情线,1)=ref(趋势线,1) AND 行情线<趋势线),HIGH*1.035,'‖'),COLOR00FF00;
FF:=EMA(CLOSE,3);
MA15:=EMA(CLOSE,21);
FA:=IF(CROSS(FF,MA15),1,0);
TR:=MAX(MAX((HIGH - LOW),ABS(ref(CLOSE,1) - HIGH)),ABS(ref(CLOSE,1) - LOW));
ATR:=MA(TR,14);
AA:=(HHV(HIGH,20) - (2 * ATR));
BB:=CROSS(CLOSE,ref(HHV(HIGH,55),1));
SSS:=CROSS(MIN(MA(CLOSE,13),AA),CLOSE);
BBB:=BARSLAST(BB);
SSSB:=BARSLAST(SSS);
B1:=((BBB = 0) AND (ref(SSSB,1) < ref(BBB,1)));
B1B:=BARSLAST(B1);
B2:=((((BB = 1) AND (B1B < SSSB)) AND (B1B > 0)) AND (COUNT(BB,SSSB) < 3));
B2B:=BARSLAST(B2);
B3:=((((BB = 1) AND (B2B < B1B)) AND (COUNT(BB,SSSB) < 4)) AND (COUNT(BB,SSSB) > 2));
DRAWTEXT((B1=1 AND 行情线>=趋势线 AND BUY11=0) OR (B2=1 AND 行情线>=趋势线 AND BUY11=0),LOW*0.98,'▲'),COLORFF00FF;
A:=(3*CLOSE+LOW+OPEN+HIGH)/6;
X:=(20*A+19*ref(A,1)+18*ref(A,2)+17*ref(A,3)+16*ref(A,4)+15*ref(A,5)+
14*ref(A,6)+13*ref(A,7)+12*ref(A,8)+11*ref(A,9)+10*ref(A,10)+9*ref(A,11)+8*ref(A,12)
+7*ref(A,13)+6*ref(A,14)+5*ref(A,15)+4*ref(A,16)+3*ref(A,17)+2*ref(A,18)+
ref(A,20))/210;
Y:=EMA(X,13);
加仓A:=SMA(EMA((C-ref(C,1))/ref(C,1),5)*100,3,1)*10;
DRAWTEXT(FILTER((CROSS(加仓A,0) OR CROSS(CLOSE,Y)) AND 行情线>=趋势线 AND BUY11=0 AND FA=0,3),LOW*0.98,'▲'),COLORFF00FF;
加仓:=(B1=1 AND 行情线>=趋势线 AND BUY11=0) OR (B2=1 AND 行情线>=趋势线 AND BUY11=0) OR FILTER((CROSS(加仓A,0) OR CROSS(CLOSE,Y)) AND 行情线>=趋势线 AND BUY11=0 AND FA=0,3);
{STICKLINE(加仓,C,O,6,1),COLORFF00FF;}
STICKLINE(加仓,OPEN,CLOSE,4.5,0),COLORff0099;
STICKLINE(加仓,OPEN,CLOSE,3,0),COLORff00CC;
STICKLINE(加仓,OPEN,CLOSE,2,0),COLORFF00FF;
VARJ1:=ref(CLOSE,1);
VARJ2:=((SMA(MAX(CLOSE-VARJ1,0),6,1))/(SMA(ABS(CLOSE-VARJ1),6,1)))*(100);
减仓A:=CROSS(85,VARJ2);
DRAWTEXT(减仓A AND 行情线>=趋势线,HIGH*1.03,'▼'),coloryelLOW;
MTM:=C-ref(C,1);
DX:=100*EMA(EMA(MTM,6),6)/EMA(EMA(ABS(MTM),6),6);
DY:=HHV(DX,2)=HHV(DX,7) AND COUNT(DX>50,2) AND CROSS(MA(DX,2),DX);
LC:=ref(CLOSE,1);
RSI:=SMA(MAX(CLOSE-LC,0),6,1)/SMA(ABS(CLOSE-LC),6,1)*100;
减仓B:=FILTER(CROSS(84,RSI) OR DY,5);
DRAWTEXT(减仓B AND 行情线>=趋势线,H*1.03,'▼'),coloryelLOW;
减仓:=减仓A OR 减仓B;
BBI:=(MA(CLOSE,3)+MA(CLOSE,6)+MA(CLOSE,12)+MA(CLOSE,24))/4;
上:=BBI+3*STD(BBI,10);
中:=BBI;
下:=BBI-3*STD(BBI,10);
优选:=BETWEEN(上,OPEN,CLOSE) AND BETWEEN(中,OPEN,CLOSE) AND BETWEEN(下,OPEN,CLOSE) AND CLOSE>OPEN AND 上>=ref(上,1) AND 中>=ref(中,1) AND 下>ref(下,1);
DRAWTEXT(FILTER(优选,2),LOW*0.95,'¤'),COLOR00FF00;
DRAWTEXT(FILTER(优选,2),LOW*0.95,'●'),COLOR00FF00;
DRAWTEXT(FA AND BUY11=0,(LOW * 0.98),'□'),COLOR0099FF;
底背离:=FA AND BUY11=0;
TY:=C;
HD:=FILTER(BACKSET(FILTER(ref(TY,10)=HHV(TY,2*10+1),10),10+1),10);
LD:=FILTER(BACKSET(FILTER(ref(TY,10)=LLV(TY,2*10+1),10),10+1),10);
A2:=ref(C,BARSLAST(HD));
B2A:=ref(C,BARSLAST(LD));
T1:=BARSLAST(HD)<BARSLAST(LD) AND NOT(HD) ;
T2:=BARSLAST(HD)>BARSLAST(LD) AND NOT(LD);
顶:IF(T1,A2,A2),COLOR00FF00,POINTDOT,LINETHICK2;
STICKLINE(T1,A2,A2,9,0),COLOR00FF00;
底:IF(T2,B2A,B2A),COLORFF00FF,POINTDOT,LINETHICK2;
STICKLINE(T2,B2A,B2A,9,0),COLORFF00FF;
Var2:=(C+L+O+H)/4;
多头线:=(20*Var2+19*ref(Var2,1)+18*ref(Var2,2)+17*ref(Var2,3)+16*ref(Var2,4)+15*ref(Var2,5)+14*ref(Var2,6)+13*ref(Var2,7)+12*ref(Var2,8)+11*ref(Var2,9)+10*ref(Var2,10)+9*ref(Var2,11)+8*ref(Var2,12)+7*ref(Var2,13)+6*ref(Var2,14)+5*ref(Var2,15)+4*ref(Var2,16)+3*ref(Var2,17)+2*ref(Var2,18)+ref(Var2,20))/210; {本文来至CXH99.COM}
空头线:=EMA(多头线,4);
STICKLINE(多头线>空头线,多头线,空头线,4,10),coloryelLOW;
STICKLINE(多头线<空头线,多头线,空头线,4,10),COLORCCCCCC; 复制代码
论坛官方微信、群(期货热点、量化探讨、开户与绑定实盘)
期货论坛 - 版权/免责声明
1.本站发布源码(包括函数、指标、策略等)均属开放源码,用意在于让使用者学习程序化语法撰写,使用者可以任意修改语法內容并调整参数。仅限用于个人学习使用,请勿转载、滥用,严禁私自连接实盘账户交易 。
2.本站发布资讯(包括文章、视频、历史记录、教材、评论、资讯、交易方案等)均系转载自网络主流媒体,内容仅为作者当日个人观点,本网转载此文出于传递更多信息之目的,并不意味着赞同其观点或证实其描述。本网不对该类信息或数据做任何保证。不对您构成任何投资建议,不能依靠信息而取代自身独立判断,不对因使用本篇文章所诉信息或观点等导致的损失承担任何责任。
3.本站发布资源(包括书籍、杂志、文档、软件等)均从互联网搜索而来,仅供个人免费交流学习,不可用作商业用途,本站不对显示的内容承担任何责任。请在下载后24小时内删除。如果喜欢,请购买正版,谢谢合作!
4.龙听期货论坛原创文章属本网版权作品,转载须注明来源“龙听期货论坛”,违者本网将保留追究其相关法律责任的权力。本论坛除发布原创文章外,亦致力于优秀财经文章的交流分享,部分文章推送时若未能及时与原作者取得联系并涉及版权问题时,请及时联系删除。联系方式:http://www.qhlt.cn/thread-262-1-1.html