指标编写问答21 学习的宝藏
106.问:
有三条指标线,分别是A、B、C1,自指标线B上穿指标线C1的那天起,到现在止,指标线A始终大 于指标线C1
答(vkioli2):
all(a>c1,barslast(cross(b,c1))+1);
107.问:
求助各位斑竹,将此公式改为FXJ5.0能用的
{黄金时间}
{年 2004 1990 2038
月 4 1 12
日 7 1 31
相距 15 1 1000}
起始日:=YEAR=年 and MONTH=月 and DAY=日;
MBR:=BARSLAST(起始日)-FLOOR(相距);
截止日:=MBR=0;
T1:(MBR=FLOOR(相距*0.382))*相距*0.50,LINETHICK1,COLORYELLOW;
DRAWTEXT( T1,相距*0.50,'1.382'),COLORYELLOW;
T2:(MBR=FLOOR(相距*0.618))*相距*0.50,LINETHICK1,COLORGREEN;
DRAWTEXT( T2,相距*0.40,'1.618'),COLORGREEN;
T3:(MBR=FLOOR(相距*1.618))*相距*0.50,LINETHICK1,COLORRED;
DRAWTEXT( T3,相距*0.50,'2.618'),COLORRED;
T4:(MBR=FLOOR(相距*2.236))*相距*0.50,LINETHICK1,COLORGREEN;
DRAWTEXT( T4,相距*0.40,'3.236'),COLORGREEN;
T5:(MBR=FLOOR(相距*4.236))*相距*0.50,LINETHICK1,COLORRED;
DRAWTEXT( T5,相距*0.50,'5.236'),COLORRED;
T6:(MBR=FLOOR(相距*6.236))*相距*0.50,LINETHICK1,COLORYELLOW;
DRAWTEXT( T6,相距*0.50,'7.236'),COLORYELLOW;
STICKLINE( 起始日,0,相距*0.85,3 ,0 ),COLORYELLOW;
DRAWTEXT( 起始日,相距*0.70,'←A'),COLORFFFFFF;
STICKLINE( 截止日,0,相距*0.85,3 ,0 ),COLORYELLOW;
DRAWTEXT( 截止日,相距*0.70,'←B'),COLORFFFFFF;
答(hengyue):
input:年(2004,1990,2038),月(4,1,12),日(7,1,31),相距(15,1,1000);
起始日:=YEAR=年 and MONTH=月 and DAY=日;
MBR:=BARSLAST(起始日)-FLOOR(相距);
截止日:=MBR=0;
T1:(MBR=FLOOR(相距*0.382))*相距*0.50,LINETHICK1,COLORYELLOW;
DRAWTEXT( T1,相距*0.50,'1.382'),COLORYELLOW;
T2:(MBR=FLOOR(相距*0.618))*相距*0.50,LINETHICK1,COLORGREEN;
DRAWTEXT( T2,相距*0.40,'1.618'),COLORGREEN;
T3:(MBR=FLOOR(相距*1.618))*相距*0.50,LINETHICK1,COLORRED;
DRAWTEXT( T3,相距*0.50,'2.618'),COLORRED;
T4:(MBR=FLOOR(相距*2.236))*相距*0.50,LINETHICK1,COLORGREEN;
DRAWTEXT( T4,相距*0.40,'3.236'),COLORGREEN;
T5:(MBR=FLOOR(相距*4.236))*相距*0.50,LINETHICK1,COLORRED;
DRAWTEXT( T5,相距*0.50,'5.236'),COLORRED;
T6:(MBR=FLOOR(相距*6.236))*相距*0.50,LINETHICK1,COLORYELLOW;
DRAWTEXT( T6,相距*0.50,'7.236'),COLORYELLOW;
STICKLINE( 起始日,0,相距*0.85,3 ,0 ),COLORYELLOW;
DRAWTEXT( 起始日,相距*0.70,'←A'),COLORFFFFFF;
STICKLINE( 截止日,0,相距*0.85,3 ,0 ),COLORYELLOW;
DRAWTEXT( 截止日,相距*0.70,'←B'),COLORFFFFFF;
108.问:
怎样写今日收盘价大于前2日的收盘价的分析家选股公式
答(多多):
c>ref(c,2);
109.问:
两天的成交量基本相同,怎么写?
答(懒汉):
abs(v/ref(v,1)-1)<N/100;
110.问:
要求如下:
以日k线为准,n日为一个单位再做副图上的k线?(注意:不是以上市日开始做k线,而是以最后一日线 开始计,倒做).大智慧的,帮个贴源码
答(懒汉):
这个问题需要 最后K线 的表达
大智慧应该没有这个函数
但如果当天有交易则可以用动态行情数据与日线数据的关系来表达
w:=BARSSINCE(BACKSET(DYNAINFO(3)=ref(c,1) and DYNAINFO(4)=o and DYNAINFO(5)=h
and DYNAINFO(6)=l and DYNAINFO(7)=c and DYNAINFO(37)=v/capital,120))*0;
STICKLINE(c>o or (c=o and c>=ref(c,1)),h+w,L+w,6,1),COLORMAGENTA;
STICKLINE(c>o or (c=o and c>=ref(c,1)),c+w,o+w,6,1),COLORMAGENTA;
STICKLINE(c<o or (c=o and c<ref(c,1)),h+w,L+w,0.1,0),COLORGREEN;
STICKLINE(c<o or (c=o and c<ref(c,1)),c+w,o+w,6,0),COLORGREEN;
:):):):):):) 谢谢楼主分享
页:
[1]