Hello guys,
I have searched the forum quite intensively but can't find what I need.
I want to create a very basic indicator of existing overhead supply that I would compute like this:
- Take the "latest Close"
- Count how many days in the last X months the price closed above the "latest close"
I would think it could be done with Cum or Sum like in the remark on this page https://www.amibroker.com/guide/afl/sum.html but I don't see how I can "fix / make permanent" the value of the "latest close" in the evaluation below:
IsOverhead = C > "latest close / fixed value when the exploration is run";
OverheadDayCount = Sum(IsOverhead,120);
It's probably dead simple but I can't find the solution.
Thanks for the help,