博易大師軟件分鐘k線圖用:有夜盤的能用,有日盤的分時圖里顯示不正確,麻煩老師幫助修該一下,能夠通用 [博易POBO]
咨詢內容:
?AH:=STKCALC('',6,'REF(H,1)');
?AL:=STKCALC('',6,'REF(L,1)');
?AHL:=STKCALC('',6,'REF((H+L)/2,1)');
?AO:=STKCALC('',6,'REF(O,1)');
?AC:=STKCALC('',6,'REF(C,1)');
?A1:=BARSLAST(A);
DRAWLINE((DATAPERIOD<6 OR DATAPERIOD=13) AND A1>=0,AH,ISLASTBAR,AH,1),LINETHICK2,COLOR808000;
DRAWLINE((DATAPERIOD<6 OR DATAPERIOD=13)AND A1>=0,AL,ISLASTBAR,AL,1),LINETHICK2,COLOR0000FF;
DRAWLINE((DATAPERIOD<6 OR DATAPERIOD=13) AND A1>=0,AHL,ISLASTBAR,AHL,1),LINETHICK2,COLORFFFF80;
DRAWLINE((DATAPERIOD<6 OR DATAPERIOD=13)AND A1>=0,AO,ISLASTBAR,AO,1),LINETHICK2,COLOR80FF00;
DRAWLINE((DATAPERIOD<6 OR DATAPERIOD=13)AND A1>=0,AC,ISLASTBAR,AC,1),LINETHICK2,COLOR80FFFF;
DRAWNUMBER((DATAPERIOD<6 OR DATAPERIOD=13) AND ISLASTBAR,AH,AH,2),ALIGN(0),VALIGN(2),COLOR808000;
DRAWTEXT((DATAPERIOD<6 OR DATAPERIOD=13) AND ISLASTBAR, AH,' ? ? ? ? ? ? ? ? ? ? 昨高'),FONTSIZE(9),VALIGN(2),ALIGN0,COLOR808000;
DRAWNUMBER((DATAPERIOD<6 OR DATAPERIOD=13) AND ISLASTBAR,AL,AL,2),ALIGN(0),VALIGN(2),COLOR0000FF;
DRAWTEXT((DATAPERIOD<6 OR DATAPERIOD=13) AND ISLASTBAR, AL,' ? ? ? ? ? ? ? ? ? ? 昨低'),FONTSIZE(9),VALIGN(2),ALIGN0,COLOR0000FF;
DRAWNUMBER((DATAPERIOD<6 OR DATAPERIOD=13) AND ISLASTBAR,AHL,AHL,2),ALIGN(0),VALIGN(2),COLORFFFF80;
DRAWTEXT((DATAPERIOD<6 OR DATAPERIOD=13) AND ISLASTBAR, AHL,' ? ? ? ? ? ? ? ? ? ?昨1/2'),FONTSIZE(9),VALIGN(2),ALIGN0,COLORFFFF80;
DRAWNUMBER((DATAPERIOD<6 OR DATAPERIOD=13) AND ISLASTBAR,AO,AO,2),ALIGN(0),VALIGN(2),COLOR80FF00;
DRAWTEXT((DATAPERIOD<6 OR DATAPERIOD=13) AND ISLASTBAR, AO,' ? ? ? ? ? ? ? ? ? ? 昨開'),FONTSIZE(9),VALIGN(2),ALIGN0,COLOR80FF00;
DRAWNUMBER((DATAPERIOD<6 OR DATAPERIOD=13) AND ISLASTBAR,AC,AC,2),ALIGN(0),VALIGN(2),COLOR80FFFF;
DRAWTEXT((DATAPERIOD<6 OR DATAPERIOD=13) AND ISLASTBAR, AC,' ? ? ? ? ? ? ? ? ? ? 昨收 '),FONTSIZE(9),VALIGN(2),ALIGN0,COLOR80FFFF;
DRAWKLINE(H,O,L,C);
?A:=STKCALC('',6,'ISLASTBAR');
?AH:=STKCALC('',6,'REF(H,1)');
?AL:=STKCALC('',6,'REF(L,1)');
?AHL:=STKCALC('',6,'REF((H+L)/2,1)');
?AO:=STKCALC('',6,'REF(O,1)');
?AC:=STKCALC('',6,'REF(C,1)');
?A1:=BARSLAST(A);
B1:=REF(HOUR,1)=15 AND HOUR<>15;
B11:= DATE=CURRENTDATE;
B2:=B1 AND B11;
DRAWLINE((DATAPERIOD<6 OR DATAPERIOD=13) AND B2,REF(AH,1),ISLASTBAR,AH,1),LINETHICK2,COLOR808000;
DRAWLINE((DATAPERIOD<6 OR DATAPERIOD=13) AND B2,AL,ISLASTBAR,AL,1),LINETHICK2,COLOR0000FF;
DRAWLINE((DATAPERIOD<6 OR DATAPERIOD=13) AND B2,AHL,ISLASTBAR,AHL,1),LINETHICK2,COLORFFFF80;
DRAWLINE((DATAPERIOD<6 OR DATAPERIOD=13)AND ?B2,AO,ISLASTBAR,AO,1),LINETHICK2,COLOR80FF00;
DRAWLINE((DATAPERIOD<6 OR DATAPERIOD=13)AND ?B2,AC,ISLASTBAR,AC,1),LINETHICK2,COLOR80FFFF;
DRAWNUMBER((DATAPERIOD<6 OR DATAPERIOD=13) AND ISLASTBAR,AH,AH,2),ALIGN(0),VALIGN(2),COLOR808000;
DRAWTEXT((DATAPERIOD<6 OR DATAPERIOD=13) AND ISLASTBAR, AH,' ? ? ? ? ? ? ? ? ? ? 昨高'),FONTSIZE(9),VALIGN(2),ALIGN0,COLOR808000;
DRAWNUMBER((DATAPERIOD<6 OR DATAPERIOD=13) AND ISLASTBAR,AL,AL,2),ALIGN(0),VALIGN(2),COLOR0000FF;
DRAWTEXT((DATAPERIOD<6 OR DATAPERIOD=13) AND ISLASTBAR, AL,' ? ? ? ? ? ? ? ? ? ? 昨低'),FONTSIZE(9),VALIGN(2),ALIGN0,COLOR0000FF;
DRAWNUMBER((DATAPERIOD<6 OR DATAPERIOD=13) AND ISLASTBAR,AHL,AHL,2),ALIGN(0),VALIGN(2),COLORFFFF80;
DRAWTEXT((DATAPERIOD<6 OR DATAPERIOD=13) AND ISLASTBAR, AHL,' ? ? ? ? ? ? ? ? ? ?昨1/2'),FONTSIZE(9),VALIGN(2),ALIGN0,COLORFFFF80;
DRAWNUMBER((DATAPERIOD<6 OR DATAPERIOD=13) AND ISLASTBAR,AO,AO,2),ALIGN(0),VALIGN(2),COLOR80FF00;
DRAWTEXT((DATAPERIOD<6 OR DATAPERIOD=13) AND ISLASTBAR, AO,' ? ? ? ? ? ? ? ? ? ? 昨開'),FONTSIZE(9),VALIGN(2),ALIGN0,COLOR80FF00;
DRAWNUMBER((DATAPERIOD<6 OR DATAPERIOD=13) AND ISLASTBAR,AC,AC,2),ALIGN(0),VALIGN(2),COLOR80FFFF;
DRAWTEXT((DATAPERIOD<6 OR DATAPERIOD=13) AND ISLASTBAR, AC,' ? ? ? ? ? ? ? ? ? ? 昨收 '),FONTSIZE(9),VALIGN(2),ALIGN0,COLOR80FFFF;
DRAWKLINE(H,O,L,C); 謝謝老師,真麻煩.......無語咋就不能通用哪,跨周期調用函數STKCALC('',6,'C')搞的鬼吧 來源 程序化久久網
博易大師軟件分鐘k線圖用:有夜盤的能用,有日盤的分時圖里顯示不正確,麻煩老師幫助修該一下,能夠通用
A:=STKCALC('',6,'ISLASTBAR');?AH:=STKCALC('',6,'REF(H,1)');
?AL:=STKCALC('',6,'REF(L,1)');
?AHL:=STKCALC('',6,'REF((H+L)/2,1)');
?AO:=STKCALC('',6,'REF(O,1)');
?AC:=STKCALC('',6,'REF(C,1)');
?A1:=BARSLAST(A);
DRAWLINE((DATAPERIOD<6 OR DATAPERIOD=13) AND A1>=0,AH,ISLASTBAR,AH,1),LINETHICK2,COLOR808000;
DRAWLINE((DATAPERIOD<6 OR DATAPERIOD=13)AND A1>=0,AL,ISLASTBAR,AL,1),LINETHICK2,COLOR0000FF;
DRAWLINE((DATAPERIOD<6 OR DATAPERIOD=13) AND A1>=0,AHL,ISLASTBAR,AHL,1),LINETHICK2,COLORFFFF80;
DRAWLINE((DATAPERIOD<6 OR DATAPERIOD=13)AND A1>=0,AO,ISLASTBAR,AO,1),LINETHICK2,COLOR80FF00;
DRAWLINE((DATAPERIOD<6 OR DATAPERIOD=13)AND A1>=0,AC,ISLASTBAR,AC,1),LINETHICK2,COLOR80FFFF;
DRAWNUMBER((DATAPERIOD<6 OR DATAPERIOD=13) AND ISLASTBAR,AH,AH,2),ALIGN(0),VALIGN(2),COLOR808000;
DRAWTEXT((DATAPERIOD<6 OR DATAPERIOD=13) AND ISLASTBAR, AH,' ? ? ? ? ? ? ? ? ? ? 昨高'),FONTSIZE(9),VALIGN(2),ALIGN0,COLOR808000;
DRAWNUMBER((DATAPERIOD<6 OR DATAPERIOD=13) AND ISLASTBAR,AL,AL,2),ALIGN(0),VALIGN(2),COLOR0000FF;
DRAWTEXT((DATAPERIOD<6 OR DATAPERIOD=13) AND ISLASTBAR, AL,' ? ? ? ? ? ? ? ? ? ? 昨低'),FONTSIZE(9),VALIGN(2),ALIGN0,COLOR0000FF;
DRAWNUMBER((DATAPERIOD<6 OR DATAPERIOD=13) AND ISLASTBAR,AHL,AHL,2),ALIGN(0),VALIGN(2),COLORFFFF80;
DRAWTEXT((DATAPERIOD<6 OR DATAPERIOD=13) AND ISLASTBAR, AHL,' ? ? ? ? ? ? ? ? ? ?昨1/2'),FONTSIZE(9),VALIGN(2),ALIGN0,COLORFFFF80;
DRAWNUMBER((DATAPERIOD<6 OR DATAPERIOD=13) AND ISLASTBAR,AO,AO,2),ALIGN(0),VALIGN(2),COLOR80FF00;
DRAWTEXT((DATAPERIOD<6 OR DATAPERIOD=13) AND ISLASTBAR, AO,' ? ? ? ? ? ? ? ? ? ? 昨開'),FONTSIZE(9),VALIGN(2),ALIGN0,COLOR80FF00;
DRAWNUMBER((DATAPERIOD<6 OR DATAPERIOD=13) AND ISLASTBAR,AC,AC,2),ALIGN(0),VALIGN(2),COLOR80FFFF;
DRAWTEXT((DATAPERIOD<6 OR DATAPERIOD=13) AND ISLASTBAR, AC,' ? ? ? ? ? ? ? ? ? ? 昨收 '),FONTSIZE(9),VALIGN(2),ALIGN0,COLOR80FFFF;
DRAWKLINE(H,O,L,C);
?
?來源:程序化99網( www.kzuj.com.cn )
博易技術人員: 以下為白盤有效,建議白盤和夜盤品種分別調用??A:=STKCALC('',6,'ISLASTBAR');
?AH:=STKCALC('',6,'REF(H,1)');
?AL:=STKCALC('',6,'REF(L,1)');
?AHL:=STKCALC('',6,'REF((H+L)/2,1)');
?AO:=STKCALC('',6,'REF(O,1)');
?AC:=STKCALC('',6,'REF(C,1)');
?A1:=BARSLAST(A);
B1:=REF(HOUR,1)=15 AND HOUR<>15;
B11:= DATE=CURRENTDATE;
B2:=B1 AND B11;
DRAWLINE((DATAPERIOD<6 OR DATAPERIOD=13) AND B2,REF(AH,1),ISLASTBAR,AH,1),LINETHICK2,COLOR808000;
DRAWLINE((DATAPERIOD<6 OR DATAPERIOD=13) AND B2,AL,ISLASTBAR,AL,1),LINETHICK2,COLOR0000FF;
DRAWLINE((DATAPERIOD<6 OR DATAPERIOD=13) AND B2,AHL,ISLASTBAR,AHL,1),LINETHICK2,COLORFFFF80;
DRAWLINE((DATAPERIOD<6 OR DATAPERIOD=13)AND ?B2,AO,ISLASTBAR,AO,1),LINETHICK2,COLOR80FF00;
DRAWLINE((DATAPERIOD<6 OR DATAPERIOD=13)AND ?B2,AC,ISLASTBAR,AC,1),LINETHICK2,COLOR80FFFF;
DRAWNUMBER((DATAPERIOD<6 OR DATAPERIOD=13) AND ISLASTBAR,AH,AH,2),ALIGN(0),VALIGN(2),COLOR808000;
DRAWTEXT((DATAPERIOD<6 OR DATAPERIOD=13) AND ISLASTBAR, AH,' ? ? ? ? ? ? ? ? ? ? 昨高'),FONTSIZE(9),VALIGN(2),ALIGN0,COLOR808000;
DRAWNUMBER((DATAPERIOD<6 OR DATAPERIOD=13) AND ISLASTBAR,AL,AL,2),ALIGN(0),VALIGN(2),COLOR0000FF;
DRAWTEXT((DATAPERIOD<6 OR DATAPERIOD=13) AND ISLASTBAR, AL,' ? ? ? ? ? ? ? ? ? ? 昨低'),FONTSIZE(9),VALIGN(2),ALIGN0,COLOR0000FF;
DRAWNUMBER((DATAPERIOD<6 OR DATAPERIOD=13) AND ISLASTBAR,AHL,AHL,2),ALIGN(0),VALIGN(2),COLORFFFF80;
DRAWTEXT((DATAPERIOD<6 OR DATAPERIOD=13) AND ISLASTBAR, AHL,' ? ? ? ? ? ? ? ? ? ?昨1/2'),FONTSIZE(9),VALIGN(2),ALIGN0,COLORFFFF80;
DRAWNUMBER((DATAPERIOD<6 OR DATAPERIOD=13) AND ISLASTBAR,AO,AO,2),ALIGN(0),VALIGN(2),COLOR80FF00;
DRAWTEXT((DATAPERIOD<6 OR DATAPERIOD=13) AND ISLASTBAR, AO,' ? ? ? ? ? ? ? ? ? ? 昨開'),FONTSIZE(9),VALIGN(2),ALIGN0,COLOR80FF00;
DRAWNUMBER((DATAPERIOD<6 OR DATAPERIOD=13) AND ISLASTBAR,AC,AC,2),ALIGN(0),VALIGN(2),COLOR80FFFF;
DRAWTEXT((DATAPERIOD<6 OR DATAPERIOD=13) AND ISLASTBAR, AC,' ? ? ? ? ? ? ? ? ? ? 昨收 '),FONTSIZE(9),VALIGN(2),ALIGN0,COLOR80FFFF;
DRAWKLINE(H,O,L,C); 謝謝老師,真麻煩.......無語咋就不能通用哪,跨周期調用函數STKCALC('',6,'C')搞的鬼吧 來源 程序化久久網
有思路,想編寫各種指標公式,交易模型,選股公式,還原公式的朋友
可聯系技術人員 QQ: 262069696 或微信號:cxh99cxh99 進行 有償收費 編寫!
(注:由于人數限制,QQ或微信請選擇方便的一個聯系我們就行,加好友時請簡單備注下您的需求,否則無法通過。謝謝您!)
相關文章
-
沒有相關內容