Beruflich Dokumente
Kultur Dokumente
printf("\n\nThe MACD can provide buy/sell indications in three ways, signal line
crossovers, overbought/oversold conditions, and divergences.\n");
printf("\n\nCrossovers:\n");
printf("\nCurrently the MACD is "+
WriteIf(MACD() > Signal(),"bullish","bearish")+
" since it is trading "+
WriteIf(MACD() > Signal(),"above","below")+
" its signal line.");
prevclose=Ref(Close,-bars);
printf("\n\nOverbought/Oversold:");
Osc = OscP( 12, 26 );
Osc1 = Ref( Osc, -1 );
Osc5 = Ref( Osc, -5 );
printf("\n"+WriteIf( Osc <= -3 AND ( Osc - Osc5 ) == -Sum( abs( Osc - Osc1 ), 5 ),
"The MACD is in an oversold range. Prices may continue to move lower for some time.
Wait for prices to move higher before considering any long positions.",
WriteIf( Osc >= 3 AND ( Osc - Osc5 ) == Sum( abs( Osc - Osc1 ), 5 ),
"The MACD is in an overbought range. Prices may continue to move higher for some
time. Wait for prices to move lower before considering any short positions.",
"The MACD is not in an Overbought/Oversold range.")));
printf("\n\nDivergence:\n");
temp = Trough(Low, 2, 1) < 0.96 * Ref( Trough(Low, 2, 1), -1) AND
ValueWhen( Trough(Low, 2, 1) != Ref( Trough(Low, 2, 1), -1 ), MACD(), 1 ) >= 0.90 *
ValueWhen( Trough( Low, 2, 1) != Ref( Trough( Low, 2, 1), -1 ), MACD(), 2 ) AND
MACD() < 0;
temp2= Peak( High,2, 1) > 1.04 * Ref( Peak( High, 2, 1), -1) AND
ValueWhen( Peak( High, 2, 1) != Ref( Peak( High, 2, 1), -1 ), MACD(), 1 ) <= 0.90 *
ValueWhen( Peak( High, 2, 1) != Ref( Peak( High, 2, 1), -1 ), MACD(), 2 ) AND
MACD() > 0;