 |
cgjj
總版主

註冊日期: Oct 2003
來 自:
文章數量: 18091 |
回覆: 求救 在小時區討上大時區K棒
引用: 最初由 ivancclai 發表
版主你好,
我有一個問題求救, 需要你給範例
在一分K跟五分K及多秒K畫上空心的日K棒
在30/60分K上套上空心的周K棒
在日K上套上套上空心的月K棒
在周K上套上套上空心的季K棒
因為我不知道如何取開始問至開始畫需要你給範例
謝謝你
原碼: TDE:=TradeDate;
if datatype=1 or datatype=2 then begin //1分,5分
StCK:=TDE<>ref(TDE,1);
end else if datatype=4 or datatype=5 then begin //30分,60分
TWN:=floor((DATEDIFF(700105,TDE)/7));
StCK:=TWN<>ref(TWN,1);
end else if datatype=6 then begin //日線
TMH:=floor(mod(TDE,10000)/100);
StCK:=TMH<>ref(TMH,1);
end else if datatype=7 then begin //週線
TMH:=floor(mod(TDE,10000)/100);
TQN:=sum((TMH<>ref(TMH,1) or barpos=0) and mod(TMH,3)=1,0);
StCK:=TQN<>ref(TQN,1);
end else if datatype=12 then begin //多秒
StCK:=barpos=1;
end else begin
exit; //其它週期跳離
end;
EdCK:=refx(StCK,1) or islastbar;
StSP:=barslast(StCK);
MO:ref(O,StSP) coloryellow linethick;
MH:HHV(H,StSP+1) coloryellow linethick;
MH:=setval(EdCK,MH,-StSP,MH);
ML:LLV(L,StSP+1) coloryellow linethick;
ML:=setval(EdCK,ML,-StSP,ML);
MC:setval(EdCK,C,-StSP,C) coloryellow linethick;
DW:=setval(EdCK,EdCK,-StSP, EdCK) and StSP>0;
MK:=barpos-floor((StSP/2));
MK:=setval(EdCK,MK,-StSP,MK);
STICKLINE(StCK,MC,MO,0.1,0) linedot coloryellow;
STICKLINE(EdCK,MC,MO,0.1,0) linedot coloryellow;
PARTLINE(DW,MO) linedot coloryellow;
PARTLINE(DW,MC) linedot coloryellow;
STICKLINE(barpos=MK,MH,max(MC,MO),0.1,0) linedot coloryellow;
STICKLINE(barpos=MK,ML,min(MC,MO),0.1,0) linedot coloryellow;
|
|
向版主報告此篇 |  |
|
2021-09-02 09:45 |
|
|
|  |
 |
ivancclai
資深會員
註冊日期: Apr 2017
來 自: New Taipei city
文章數量: 243 |
謝謝版主,
版主你好
還需要請你幫我一下作修正
在一分K及多秒K畫上空心的60K棒
在全日盤上台指期+ 分早盤跟夜盤各是一根K棒計算
K棒可以分紅K跟黑K 可用 黃色及白色
謝謝版主
|
|
向版主報告此篇 |  |
|
2021-09-03 05:29 |
|
|
|  |
 |
ivancclai
資深會員
註冊日期: Apr 2017
來 自: New Taipei city
文章數量: 243 |
版主你好
多秒K線 基礎先以10秒K 來計算 1分K 有ˊ6根
一小時就有360 根 用這個給我範例後 我就可以自己修正
謝謝版主
|
|
向版主報告此篇 |  |
|
2021-09-03 11:17 |
|
|
|  |
 |
cgjj
總版主

註冊日期: Oct 2003
來 自:
文章數量: 18091 |
引用: 最初由 ivancclai 發表
版主你好
多秒K線 基礎先以10秒K 來計算 1分K 有ˊ6根
一小時就有360 根 用這個給我範例後 我就可以自己修正
謝謝版主
原碼: TDE:=TradeDate;
if datatype=1 then begin //1分
StCK:=mod(barslast(TDE<>ref(TDE,1 or IsRegularFBar)),60)=0;
end else if datatype=2 then begin //5分
StCK:=TDE<>ref(TDE,1) or IsRegularFBar;
end else if datatype=4 or datatype=5 then begin //30分,60分
TWN:=floor((DATEDIFF(700105,TDE)/7));
StCK:=TWN<>ref(TWN,1);
end else if datatype=6 then begin //日線
TMH:=floor(mod(TDE,10000)/100);
StCK:=TMH<>ref(TMH,1);
end else if datatype=7 then begin //週線
TMH:=floor(mod(TDE,10000)/100);
TQN:=sum((TMH<>ref(TMH,1) or barpos=0) and mod(TMH,3)=1,0);
StCK:=TQN<>ref(TQN,1);
end else if datatype=12 then begin //多秒
StCK:=barpos=1 or minute<>ref(minute,1); //採分切割
end else begin
exit; //其它週期跳離
end;
EdCK:=refx(StCK,1) or islastbar;
StSP:=barslast(StCK);
MO:ref(O,StSP) color0066cc linethick;
MH:HHV(H,StSP+1) color0066cc linethick;
MH:=setval(EdCK,MH,-StSP,MH);
ML:LLV(L,StSP+1) color0066cc linethick;
ML:=setval(EdCK,ML,-StSP,ML);
MC:setval(EdCK,C,-StSP,C) color0066cc linethick;
DW:=setval(EdCK,EdCK,-StSP, EdCK) and StSP>0;
MK:=barpos-floor((StSP/2));
MK:=setval(EdCK,MK,-StSP,MK);
紅K:=MC>MO or MC=MO and MC>ref(MC,StSP+1);
STICKLINE(紅K=1 and StCK,MC,MO,0.1,0) linedot coloryellow;
STICKLINE(紅K=1 and EdCK,MC,MO,0.1,0) linedot coloryellow;
PARTLINE(紅K=1 and DW,MO) linedot coloryellow;
PARTLINE(紅K=1 and DW,MC) linedot coloryellow;
STICKLINE(紅K=1 and barpos=MK,MH,max(MC,MO),0.1,0) linedot coloryellow;
STICKLINE(紅K=1 and barpos=MK,ML,min(MC,MO),0.1,0) linedot coloryellow;
STICKLINE(紅K=0 and StCK,MC,MO,0.1,0) linedot colorwhite;
STICKLINE(紅K=0 and EdCK,MC,MO,0.1,0) linedot colorwhite;
PARTLINE(紅K=0 and DW,MO) linedot colorwhite;
PARTLINE(紅K=0 and DW,MC) linedot colorwhite;
STICKLINE(紅K=0 and barpos=MK,MH,max(MC,MO),0.1,0) linedot colorwhite;
STICKLINE(紅K=0 and barpos=MK,ML,min(MC,MO),0.1,0) linedot colorwhite;
|
|
向版主報告此篇 |  |
|
2021-09-03 11:52 |
|
|
|  |
本站所有內容未經作者授權禁止轉貼節錄, 發表言論僅供參考勿作為投資決策依據。瀏覽本站請使用 IE 5.5 以上版本, 最佳瀏覽解析度 1024 x 768 全彩。
|
Powered by: vBulletin Version 2.3.0 - Copyright©2000-, Jelsoft Enterprises Limited.
簡愛洋行 製作 Copyright 2003-. All Rights Reserved. 聯絡我們
|