I created an indicator that uses multiple time frame data. The indicator is applied to a 5 min chart and the higher time frame is 60 minutes.
In the Initialize() section I have: Add(PeriodType.Minute,60);
Also, CalculateOnBarClose=true.
I need my code to return...
"Green" when the 60 min MACD bar values increase (based on 2 consecutive bars).
"Red" when the 60 min MACD bar values decrease.
My understanding is that I should use something like this:
Bar_0=MACD(BarsArray[1],12,26,30).Diff[0];
Bar_1=MACD(BarsArray[1],12,26,30).Diff[1];
if (Bar_0 > Bar_1) etc...
But I noticed something wrong and I decided to Print (Bar_0) to do some troubleshooting. The printed values are way off and do not correspond to the values observed on the 60 min MACD indicator section.
Looks like I am doing something wrong. What is the proper function to use?
Thanks.
- mp

Comment