|
當條件成立, 並想在同一支bar穿頂時買入, 請問怎樣寫?
圖1 = 想做的
圖2 = 以下code 做到的
sma1 = AverageFC( Close, 4 ) ;
sma2 = AverageFC( Close, 5 ) ;
sma4 = AverageFC( Close, 10 ) ;
condition1= sma2>sma4 and low<sma1 ;
if condition1 then
Buy ("Long" ) next bar at high stop ;
|
-
現在做到
-
想做到
|