I'm trying out a new strategy that checks on MACD average differences between 2 bars from a higher time frame chart before entering a trade. However, the values that the MACD avg produces are the same as the ones from the lower time frame.
For example, my strategy enters a trade on the 2-min /CL chart based on 5-min /CL chart MACD avg differences between bar[0] and bar[14]. When I print the values, for the MACD Avg values from 2-min and 5-min, they are exactly the same.
What might I be doing wrong?
Thanks in advance for your help.
Here's a snippet of the code that relates to the higher time frame check:
// HTF Indicator
private MACD MACD2;
......
else if (State == State.Configure)
{
AddDataSeries(Data.BarsPeriodType.Minute, 5);
MACD2 = MACD(Closes[1], 21, 29, 9);
​
// Condition check
if (MACD2.Avg[0] > MACD2.Avg[14])
......

Comment