請選擇 進入手機版 | 繼續訪問電腦版

COCO研究院

 找回密碼
 註冊
搜索
查看: 2920|回復: 4

[教學] 求指教 , 找出20:00 至第2日 05:00 的HIGH

[複製鏈接]
發表於 19-4-30 23:57 | 顯示全部樓層 |閱讀模式
請問應怎樣修正

inputs:  
Timelen1(2000),
Timelen2(0500);

vars:
YHigh(0),
YLow(0),
THigh(0),
TLow(0);

if Timelen1 <= time then
        YHigh = HighD(1);
if time <=Timelen2 then
        THigh = HighD;

maxlist(YHigh,THigh);


發表於 19-5-9 17:37 | 顯示全部樓層
cenfrank 發表於 19-5-8 14:29
請問如果是日夜盤連續下日盤高低點跟夜盤高低點這樣是否也可以??

基本上 這個就是自已記錄高低點...
HIGHD跟LOWD是"每天"的最高最低,但台指夜盤跨"不同天"...
所以以前可以用的HIGHD跟LOWD可能變成跟你想(要)不同
這時你就要自已來...

回復 支持 1 反對 0

使用道具 舉報

發表於 19-5-1 20:49 | 顯示全部樓層
Var:RefHigh(High);
If time >= 2000 or time <= 0500 then begin

If time[1] < 2000 and time >= 2000 then begin
   RefHigh=High ;
End else begin
   If High > RefHigh then RefHigh = High ;
End;

End;

// RefHigh 就是區間內的高點
發表於 19-5-2 13:42 | 顯示全部樓層

1. inputs 的2000, 0500
  建議改用Var,自已試參數時可暫時用inputs

2. 2000 ~ 0500
  屬於跨日(兩個時段區塊).    2000<=time  or  time <=0500
  眼熟!!??  原來半年前,你問過了...  
   http://www.coco-in.net/thread-147127-1-1.html

3. MC未提供區段內的高低點---自行紀錄
  20:00-----23:59,00:00----05:00
  K線時間含20:00時,作初始化 sect_hi 跟sect_lo

  區間時間內
    如果sect_hi 小於 high, 設sect_hi 為 high
    如果sect_lo 大於 low, 設sect_lo 為 low


// section time start and end
inputs: Sect_Time_S(2000);
inputs: Sect_Time_E(0500);

// section High and Low
Var:Sect_Hi(High);
Var:Sect_Lo(Low);

If Sect_Time_S <= time or time <= Sect_Time_E then begin

  If time[1] < Sect_Time_S and Sect_Time_S <= time[0] then begin
    Sect_Hi = high;
    Sect_Lo = Low;
  End;
  if Sect_Hi < high then Sect_Hi = high;
  if Sect_Lo > low  then Sect_Lo = low;

End;

//plot1(Sect_Hi, "Hi");
//plot2(Sect_Lo, "Lo");



發表於 19-5-8 14:29 | 顯示全部樓層
請問如果是日夜盤連續下日盤高低點跟夜盤高低點這樣是否也可以??
您需要登錄後才可以回帖 登錄 | 註冊

本版積分規則

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

GMT+8, 24-3-29 14:15

Powered by Discuz! X3.4

Copyright © 2001-2023, Tencent Cloud.

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