為何這個 SMA(9) 的指標要到 bar # 13 才開始畫?
看了程式碼也看不出來 要大於 n 才畫, 況且如果 n =9 應該地十根就開始畫呀
inputs: Price( Close ), Length( 9 ), Displace( 0 ) ;
variables: var0( 0 ) ;
var0 = AverageFC( Price, Length ) ;
condition1 = Displace >= 0 or CurrentBar > AbsValue( Displace ) ;
if condition1 then
begin
Plot1[Displace]( var0, "Avg" ) ;
if Displace <= 0 then
begin
condition1 = Price crosses over var0 ;
if condition1 then
Alert( "Price crossing over average" )
else
begin
condition1 = Price crosses under var0 ;
if condition1 then
Alert( "Price crossing under average" ) ;
end ;
end;
end ;
|