Referencing MACD histogram from the last bar

#1
Hi,
I am a beginner on AFL and would appreciate if anyone could help.

How do I refer to the MACD histogram value from the last bar ? Basically I am trying to develop a system using Momentum and MACD. Momentum will be my primary indicator for long / short. MACD will be my secondary indicator. I'll only enter long if Momentum crosses above zero and I'll need the MACD histogram value to be higher than that of the last bar.

I can write the AFL part on Momentum, but I don't really know how to write the part on comparing the two MACD histogram values. Could anyone please help ?

Thanks,
yawbus
 
#2
Hi!

It seems we have similar problem with access to data of any bar that passed during formula run. I have no idea how to create any variable that:( Please let me know if you will have any solution for this.

Jarek
 

Similar threads