|
建立自訂函數 _NDayHigh
input:LookBack(numeric) ;
Vars:TempHigh(0),Counter(0) ;
if DataCompression > 1 then TempHigh = Highest(High[1],LookBack) { for daily timeframe }
else begin { for Min K }
TempHigh = HighD(1) ;
For Counter = 1 to LookBack Begin
if HighD(Counter) > TempHigh then TempHigh = HighD(Counter) ;
end ;
end ;
_NDayHigh = TempHigh ;
建立自訂函數 _NDayLow
input:LookBack(numeric) ;
Vars:TempLow(0),Counter(0) ;
if DataCompression > 1 then TempLow = Lowest(Low[1],LookBack) { for daily timeframe }
else begin { for Min K }
TempLow = LowD(1) ;
For Counter = 1 to LookBack Begin
if LowD(Counter) < TempLow then TempLow = LowD(Counter) ;
end ;
end ;
_NDayLow = TempLow
建立自訂指標 _Plot_DayHL
Plot1( _NDayHigh(5) ) ; { 5日高點 }
Plot1( _NDayLow(5) ) ; { 5日低點 }
|
評分
-
查看全部評分
|