Comment on Code your Technical Analysis strategy

Shri commented on 01 May 2013, 08:06 AM


I want to write code to find MACD histogram.
i.e MACD – (minus) Macd Signal

For eg if macd (12,26) =10 macd signal (12,26,9)= 2 Histogram=Hist=Macd minus Macd signal = 10-2 =8

After finding histogram value my sell signal would be
Sell = Histogram < ref(close,1) and ref (close ,1) < ref (close ,2).
Here close is macd histogram values and not candle values.

Please help me code this..
Thank you

View the full comment thread »