COCO研究院

 找回密碼
 註冊
搜索
查看: 2157|回復: 5

[教學] 請問昨日的開盤前10根最高與最低價

[複製鏈接]
發表於 16-10-27 08:12 | 顯示全部樓層 |閱讀模式
想請問各位大大!

假設為1min,我想要昨日的開盤後,前10根K棒(08:46~08:55)的最高價與最低價

謝謝各位!
發表於 16-10-27 12:22 | 顯示全部樓層


這笨招不知道行不行。 就弄一個變數是今天的,然後要引用的時 候用 [1]就好了
例如 if time=0855 then begin;
high_history= highest(h,10);
low_history= lowest(l,10);
end;

要用的時候,就選 high_history[1] or low_history[1].


發表於 16-10-27 12:36 | 顯示全部樓層
Blake 發表於 16-10-27 12:22
這笨招不知道行不行。 就弄一個變數是今天的,然後要引用的時 候用 [1]就好了
例如 if time=0855 then be ...

這樣的話, 8:55後所有[1]的值都會變成"今天"那段時間的高低點,[1]是代表前一根K棒當時的值,所以當8:56後[1]通通都會變成"今天"的值,而"昨天"的值就會消失了

再想想....
 樓主| 發表於 16-10-27 16:38 | 顯示全部樓層
已試過Blake大的方法不成功,如blj0511大所說的,[1]是前一根K棒,而非前一天
發表於 16-10-27 16:59 | 顯示全部樓層
要怎樣改才會變OK? 可以想一想, 給個提示:

var:last_H(0),last_L(0);

if d>d[1] then begin

  xxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxx

end;


if time=0855 then begin;
high_history= highest(h,10);
low_history= lowest(l,10);
end;


xxxxxx 要怎麼寫呢?

評分

參與人數 1金錢 +1 收起 理由
liu777702 + 1 感謝分享

查看全部評分

發表於 16-10-27 17:03 | 顯示全部樓層
blj0511 發表於 16-10-27 16:59
要怎樣改才會變OK? 可以想一想, 給個提示:

var:last_H(0),last_L(0);




要怎樣改才會變OK? 可以想一想, 給個提示:

var:last_H(0),last_L(0);

if d>d[1] then begin
H=high_history;
last_L=low_history
end;

if time=0855 then begin;
high_history= highest(h,10);
low_history= lowest(l,10);
end;

評分

參與人數 1金錢 +1 收起 理由
liu777702 + 1 感謝分享

查看全部評分

您需要登錄後才可以回帖 登錄 | 註冊

本版積分規則

手機版|Archiver|站長信箱|廣告洽詢|COCO研究院

GMT+8, 24-4-29 09:59

Powered by Discuz! X3.4

Copyright © 2001-2023, Tencent Cloud.

快速回復 返回頂部 返回列表
理財討論網站 | AI繪圖AI超擬真美女AI beauty AI Stable DiffusionAI正妹AI Lookbook