本人初學MC, 系統自帶 跌破均線第二個交易日收盤賣出,我希望是 當天收盤前判斷是否跌破均線,如果跌破就當天收盤賣出, 請問如何變相. 系統默認 都是 Sell ( "MACrossLX" ) next bar at market ;
買
inputs: Price( Close ), Length( 9 ), ConfirmBars( 1 ) ;
variables: var0( 0 ) ;
condition1 = Price > AverageFC( Price, Length ) ;
if condition1 then
var0 = var0 + 1
else
var0 = 0 ;
condition1 = CurrentBar > ConfirmBars and var0 = ConfirmBars ;
if condition1 then
Buy ( "MACrossLE" ) next bar at market ;
賣
inputs: Price( Close ), Length( 9 ) ;
variables: var0( 0 ) ;
var0 = AverageFC( Price, Length );
condition1 = CurrentBar > 1 and Price crosses under var0 ;
if condition1 then
Sell ( "MACrossLX" ) next bar at market ;
|