求指教 , 找出20:00 至第2日 05:00 的HIGH
請問應怎樣修正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);
cenfrank 發表於 19-5-8 14:29
請問如果是日夜盤連續下日盤高低點跟夜盤高低點這樣是否也可以??
基本上 這個就是自已記錄高低點...
HIGHD跟LOWD是"每天"的最高最低,但台指夜盤跨"不同天"...
所以以前可以用的HIGHD跟LOWD可能變成跟你想(要)不同
這時你就要自已來...
Var:RefHigh(High);
If time >= 2000 or time <= 0500 then begin
If time < 2000 and time >= 2000 then begin
RefHigh=High ;
End else begin
If High > RefHigh then RefHigh = High ;
End;
End;
// RefHigh 就是區間內的高點
1. inputs 的2000, 0500
建議改用Var,自已試參數時可暫時用inputs
2. 2000 ~ 0500
屬於跨日(兩個時段區塊). 2000<=timeortime <=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 < Sect_Time_S and Sect_Time_S <= time then begin
Sect_Hi = high;
Sect_Lo = Low;
End;
if Sect_Hi < high then Sect_Hi = high;
if Sect_Lo > lowthen Sect_Lo = low;
End;
//plot1(Sect_Hi, "Hi");
//plot2(Sect_Lo, "Lo");
請問如果是日夜盤連續下日盤高低點跟夜盤高低點這樣是否也可以??
頁:
[1]