|
本帖最後由 kiyi0317 於 17-11-21 22:21 編輯
我有興趣,等我試試
Inputs : FastLength( 12 ), SlowLength( 26 ), MACDLength( 9 );
variables : ZLMACD (0), ZLMACDS (0), EMA1 (0), EMA2 (0), EMA3 (0), DIFF (0);
EMA1 = XAverage(close,FastLength);
EMA2 = XAverage(close,SlowLength);
ZLMACD = (2*EMA1-EMA1(EMA1,FastLength))-(2*EMA2-EMA2(EMA2,SlowLength));
EMA3 = XAverage(ZLMACD,MACDLength);
ZLMACDS = 2*EMA3-EMA3(EMA3,MACDLength);
DIFF = ZLMACD - ZLMACDS;
Plot1( ZLMACD, "ZLMACD" ) ;
Plot2( ZLMACDS, "MACDAvg" ) ;
Plot3( DIFF, "MACDDiff" ) ;
Plot4( 0, "ZeroLine" ) ;
為何不能complied?
|
|