Strategy

Hello,

I am trying to write a scan based on the following conditions. Can someone help me with the MACD part of it? highlighted in bold below in the strategy. That is where I am getting confused.

// BUY WHEN CLOSE IS ABOVE EMA25
AND CLOSE CROSSES 10SMA OF HIGHS
AND RSI4 GREATER THAN 50
AND MACD current bar > prev bar


This is what I have written so far


// set stock universe
[Country is US]

and

[type = stock] AND [group is not ETF] and [name not contains "Trust"] and [name not contains "Notes Due"] and [name not contains "Shares"] and [name not contains "Fund"]

and


[ TODAY CLOSE> EMA (25, CLOSE)] AND
[ TODAY HIFH x SMA(10, HIGH)] AND

[RSI(4) > 50] and
[MACD Line(12,26,9) > MACD Signal(12,26,9)] and
[MACD Line(12,26,9) > 0]



Comments

  • I'm assuming by MACD current bar you mean the MACD Hist( ) indicator:

    and [MACD Hist(12,26,9) > 1 day ago MACD Hist(12,26,9)]
  • That helps a lot. many thanks @markd