写一个通达信 EPS 指标,用来复盘成长股

年线:MA(C,250),COLORRED,LINETHICK2;

THE_18_1_DATE:=FINONE(314,2018,0331)+20000000,NODRAW;
THE_18_1_CD:=IF ( (DATE+19000000)=THE_18_1_DATE , 1,   (DATE+19000000)=THE_18_1_DATE-1 );

THE_18_2_DATE:=FINONE(314,2018,0630)+20000000,NODRAW;
THE_18_2_CD:=IF ( (DATE+19000000)=THE_18_2_DATE , 1,   (DATE+19000000)=THE_18_2_DATE-1 );

THE_18_3_DATE:=FINONE(314,2018,0930)+20000000,NODRAW;
THE_18_3_CD:=IF ( (DATE+19000000)=THE_18_3_DATE , 1,   (DATE+19000000)=THE_18_3_DATE-1 );

THE_18_4_DATE:=FINONE(314,2018,1231)+20000000,NODRAW;
THE_18_4_CD:=IF ( (DATE+19000000)=THE_18_4_DATE , 1,   (DATE+19000000)=THE_18_4_DATE-1 );

DRAWTEXT(THE_18_1_CD==1 AND REF(THE_18_1_CD,1) != 1, HIGH, STRCAT('18年一季报 EPS: ',CON2STR( FINONE(1,2018,0331),3))),COLORWHITE,DRAWABOVE;
DRAWTEXT(THE_18_2_CD==1 AND REF(THE_18_2_CD,1) != 1, HIGH, STRCAT('18年二季报 EPS: ', CON2STR( FINONE(1,2018,0630),3))),COLORWHITE,DRAWABOVE;
DRAWTEXT(THE_18_3_CD==1 AND REF(THE_18_3_CD,1) != 1, HIGH, STRCAT('18年三季报 EPS: ', CON2STR( FINONE(1,2018,0930),3))),COLORWHITE,DRAWABOVE;
DRAWTEXT(THE_18_4_CD==1 AND REF(THE_18_4_CD,1) != 1, LOW, STRCAT('18年报 EPS: ', CON2STR( FINONE(1,2018,1231),3))),COLORWHITE;

THE_19_1_DATE:=FINONE(314,2019,0331)+20000000,NODRAW;
THE_19_1_CD:=IF ( (DATE+19000000)=THE_19_1_DATE , 1,   (DATE+19000000)=THE_19_1_DATE-1 );

THE_19_2_DATE:=FINONE(314,2019,0630)+20000000,NODRAW;
THE_19_2_CD:=IF ( (DATE+19000000)=THE_19_2_DATE , 1,   (DATE+19000000)=THE_19_2_DATE-1 );

THE_19_3_DATE:=FINONE(314,2019,0930)+20000000,NODRAW;
THE_19_3_CD:=IF ( (DATE+19000000)=THE_19_3_DATE , 1,   (DATE+19000000)=THE_19_3_DATE-1 );

THE_19_4_DATE:=FINONE(314,2019,1231)+20000000,NODRAW;
THE_19_4_CD:=IF ( (DATE+19000000)=THE_19_4_DATE , 1,   (DATE+19000000)=THE_19_4_DATE-1 );

DRAWTEXT(THE_19_1_CD==1 AND REF(THE_19_1_CD,1) != 1, HIGH, STRCAT('19年一季报 EPS: ',CON2STR( FINONE(1,2019,0331),3))),COLORWHITE,DRAWABOVE;
DRAWTEXT(THE_19_2_CD==1 AND REF(THE_19_2_CD,1) != 1, HIGH, STRCAT('19年二季报 EPS: ', CON2STR( FINONE(1,2019,0630),3))),COLORWHITE,DRAWABOVE;
DRAWTEXT(THE_19_3_CD==1 AND REF(THE_19_3_CD,1) != 1, HIGH, STRCAT('19年三季报 EPS: ', CON2STR( FINONE(1,2019,0930),3))),COLORWHITE,DRAWABOVE;
DRAWTEXT(THE_19_4_CD==1 AND REF(THE_19_4_CD,1) != 1, LOW, STRCAT('19年报 EPS: ', CON2STR( FINONE(1,2019,1231),3))),COLORWHITE;

THE_20_1_DATE:=FINONE(314,2020,0331)+20000000,NODRAW;
THE_20_1_CD:=IF ( (DATE+19000000)=THE_20_1_DATE , 1,   (DATE+19000000)=THE_20_1_DATE-1 );

THE_20_2_DATE:=FINONE(314,2020,0630)+20000000,NODRAW;
THE_20_2_CD:=IF ( (DATE+19000000)=THE_20_2_DATE , 1,   (DATE+19000000)=THE_20_2_DATE-1 );

THE_20_3_DATE:=FINONE(314,2020,0930)+20000000,NODRAW;
THE_20_3_CD:=IF ( (DATE+19000000)=THE_20_3_DATE , 1,   (DATE+19000000)=THE_20_3_DATE-1 );

THE_20_4_DATE:=FINONE(314,2020,1231)+20000000,NODRAW;
THE_20_4_CD:=IF ( (DATE+19000000)=THE_20_4_DATE , 1,   (DATE+19000000)=THE_20_4_DATE-1 );

DRAWTEXT(THE_20_1_CD==1 AND REF(THE_20_1_CD,1) != 1, HIGH, STRCAT('20年一季报 EPS: ',CON2STR( FINONE(1,2020,0331),3))),COLORWHITE,DRAWABOVE;
DRAWTEXT(THE_20_2_CD==1 AND REF(THE_20_2_CD,1) != 1, HIGH, STRCAT('20年二季报 EPS: ', CON2STR( FINONE(1,2020,0630),3))),COLORWHITE,DRAWABOVE;
DRAWTEXT(THE_20_3_CD==1 AND REF(THE_20_3_CD,1) != 1, HIGH, STRCAT('20年三季报 EPS: ', CON2STR( FINONE(1,2020,0930),3))),COLORWHITE,DRAWABOVE;
DRAWTEXT(THE_20_4_CD==1 AND REF(THE_20_4_CD,1) != 1, LOW, STRCAT('20年报 EPS: ', CON2STR( FINONE(1,2020,1231),3))),COLORWHITE;

THE_21_1_DATE:=FINONE(314,2021,0331)+20000000,NODRAW;
THE_21_1_CD:=IF ( (DATE+19000000)=THE_21_1_DATE , 1,   (DATE+19000000)=THE_21_1_DATE-1 );

THE_21_2_DATE:=FINONE(314,2021,0630)+20000000,NODRAW;
THE_21_2_CD:=IF ( (DATE+19000000)=THE_21_2_DATE , 1,   (DATE+19000000)=THE_21_2_DATE-1 );

THE_21_3_DATE:=FINONE(314,2021,0930)+20000000,NODRAW;
THE_21_3_CD:=IF ( (DATE+19000000)=THE_21_3_DATE , 1,   (DATE+19000000)=THE_21_3_DATE-1 );

THE_21_4_DATE:=FINONE(314,2021,1231)+20000000,NODRAW;
THE_21_4_CD:=IF ( (DATE+19000000)=THE_21_4_DATE , 1,   (DATE+19000000)=THE_21_4_DATE-1 );

DRAWTEXT(THE_21_1_CD==1 AND REF(THE_21_1_CD,1) != 1, HIGH, STRCAT('21年一季报 EPS: ',CON2STR( FINONE(1,2021,0331),3))),COLORWHITE,DRAWABOVE;
DRAWTEXT(THE_21_2_CD==1 AND REF(THE_21_2_CD,1) != 1, HIGH, STRCAT('21年二季报 EPS: ', CON2STR( FINONE(1,2021,0630),3))),COLORWHITE,DRAWABOVE;
DRAWTEXT(THE_21_3_CD==1 AND REF(THE_21_3_CD,1) != 1, HIGH, STRCAT('21年三季报 EPS: ', CON2STR( FINONE(1,2021,0930),3))),COLORWHITE,DRAWABOVE;
DRAWTEXT(THE_21_4_CD==1 AND REF(THE_21_4_CD,1) != 1, LOW, STRCAT('21年年报 EPS: ', CON2STR( FINONE(1,2021,1231),3))),COLORWHITE;

THE_22_1_DATE:=FINONE(314,2022,0331)+20000000,NODRAW;
THE_22_1_CD:=IF ( (DATE+19000000)=THE_22_1_DATE , 1,   (DATE+19000000)=THE_22_1_DATE-1 );

THE_22_2_DATE:=FINONE(314,2022,0630)+20000000,NODRAW;
THE_22_2_CD:=IF ( (DATE+19000000)=THE_22_2_DATE , 1,   (DATE+19000000)=THE_22_2_DATE-1 );

THE_22_3_DATE:=FINONE(314,2022,0930)+20000000,NODRAW;
THE_22_3_CD:=IF ( (DATE+19000000)=THE_22_3_DATE , 1,   (DATE+19000000)=THE_22_3_DATE-1 );

THE_22_4_DATE:=FINONE(314,2022,1231)+20000000,NODRAW;
THE_22_4_CD:=IF ( (DATE+19000000)=THE_22_4_DATE , 1,   (DATE+19000000)=THE_22_4_DATE-1 );

DRAWTEXT(THE_22_1_CD==1 AND REF(THE_22_1_CD,1) != 1, HIGH, STRCAT('22年一季报 EPS: ',CON2STR( FINONE(1,2022,0331),3))),COLORWHITE,DRAWABOVE;
DRAWTEXT(THE_22_2_CD==1 AND REF(THE_22_2_CD,1) != 1, HIGH, STRCAT('22年二季报 EPS: ', CON2STR( FINONE(1,2022,0630),3))),COLORWHITE,DRAWABOVE;
DRAWTEXT(THE_22_3_CD==1 AND REF(THE_22_3_CD,1) != 1, HIGH, STRCAT('22年三季报 EPS: ', CON2STR( FINONE(1,2022,0930),3))),COLORWHITE,DRAWABOVE;
DRAWTEXT(THE_22_4_CD==1 AND REF(THE_22_4_CD,1) != 1, LOW, STRCAT('22年报 EPS: ', CON2STR( FINONE(1,2022,1231),3))),COLORWHITE;

THE_23_1_DATE:=FINONE(314,2023,0331)+20000000,NODRAW;
THE_23_1_CD:=IF ( (DATE+19000000)=THE_23_1_DATE , 1,   (DATE+19000000)=THE_23_1_DATE-1 );

THE_23_2_DATE:=FINONE(314,2023,0630)+20000000,NODRAW;
THE_23_2_CD:=IF ( (DATE+19000000)=THE_23_2_DATE , 1,   (DATE+19000000)=THE_23_2_DATE-1 );
THE_23_2_G:= (FINONE(1,2023,0630)-FINONE(1,2023,0331)) / ABS(FINONE(1,2023,0331))*100  ,NODRAW;

THE_23_3_DATE:=FINONE(314,2023,0930)+20000000,NODRAW;
THE_23_3_CD:=IF ( (DATE+19000000)=THE_23_3_DATE , 1,   (DATE+19000000)=THE_23_3_DATE-1 );
THE_23_3_G:= (FINONE(1,2023,0930)-FINONE(1,2023,0630)) / ABS(FINONE(1,2023,0630))*100  ,NODRAW;

DRAWTEXT(THE_23_1_CD==1 AND REF(THE_23_1_CD,1) != 1, HIGH, STRCAT('23年一季报 EPS: ',CON2STR( FINONE(1,2023,0331),3))),COLORWHITE,DRAWABOVE;
DRAWTEXT(THE_23_2_CD==1 AND REF(THE_23_2_CD,1) != 1, HIGH, STRCAT(STRCAT('23年二季报 EPS: ',CON2STR( FINONE(1,2023,0630),3)), STRCAT(STRCAT('  ', CON2STR(THE_23_2_G, 2) ) ,  '%') )    ),COLORWHITE,DRAWABOVE;
DRAWTEXT(THE_23_3_CD==1 AND REF(THE_23_3_CD,1) != 1, HIGH, STRCAT(STRCAT('23年三季报 EPS: ',CON2STR( FINONE(1,2023,0930),3)), STRCAT(STRCAT('  ', CON2STR(THE_23_3_G, 2) ) ,  '%') )    ),COLORWHITE,DRAWABOVE;

更新了下,根据财报发布日期,添加在 K 线位置,有些季报是星期六发的,所以往前推一个交易日放置数据。大致能看一下财报对股价的影响,另外每股收益每季增长率只计算了23年二季度和三季度,其他年份不想写了。以后的年份自己慢慢添加代码就好了。

你可以拷贝代码到你的均线指标。需要下载通达信财务数据。

暂无评论

发送评论 编辑评论


				
|´・ω・)ノ
ヾ(≧∇≦*)ゝ
(☆ω☆)
(╯‵□′)╯︵┴─┴
 ̄﹃ ̄
(/ω\)
∠( ᐛ 」∠)_
(๑•̀ㅁ•́ฅ)
→_→
୧(๑•̀⌄•́๑)૭
٩(ˊᗜˋ*)و
(ノ°ο°)ノ
(´இ皿இ`)
⌇●﹏●⌇
(ฅ´ω`ฅ)
(╯°A°)╯︵○○○
φ( ̄∇ ̄o)
ヾ(´・ ・`。)ノ"
( ง ᵒ̌皿ᵒ̌)ง⁼³₌₃
(ó﹏ò。)
Σ(っ °Д °;)っ
( ,,´・ω・)ノ"(´っω・`。)
╮(╯▽╰)╭
o(*////▽////*)q
>﹏<
( ๑´•ω•) "(ㆆᴗㆆ)
😂
😀
😅
😊
🙂
🙃
😌
😍
😘
😜
😝
😏
😒
🙄
😳
😡
😔
😫
😱
😭
💩
👻
🙌
🖕
👍
👫
👬
👭
🌚
🌝
🙈
💊
😶
🙏
🍦
🍉
😣
Source: github.com/k4yt3x/flowerhd
颜文字
Emoji
小恐龙
花!
上一篇
下一篇