|
inputs: FastLength( 12 ), SlowLength( 26 ), MACDLength( 9 ) ;
variables: var0( 0 ), var1( 0 ), var2( 0 ) ;
var0 = MACD( Close, FastLength, SlowLength ) ;
var1 = XAverage( var0, MACDLength ) ;
var2 = var0 - var1 ;
condition1 = var0 > var1 and var0 > 0;
condition8 = var0 cross under var0[2];
condition9 = var0 cross under var1;
if condition1 then Buy ( "buy" ) next bar at market ;
if condition8 or condition9 then sell ( "sell" ) next bar at market ;
新手請教
想寫 var2(macd柱)0軸以上大過前一支(發散), (雙牛)0軸以上金叉 應該點寫?
現在好似是 var0 > 0軸 就會買入........... |
|