I've read a lot about this subject on the forum, but it's still not clear to me what's the simplest way to use this concept in a strategy. The MRO method doesn't seem to be the way to go (at least not for what I have in mind, which is something very basic btw). The int Variables BarsSince & TriggerBar seem more promising, but I don't know how to make a bool flag with them, which is what I want to do.
I'd like to add a bool flag to one of the criteria in the strategy that becomes true only if 5 or more bars have closed since the condition was last true.
The bool flag is called "Barcount". Here's what I've got so far:
if (conditions here && Barcount)
{
Barcount = false;
}
if ("this is what I still need to figure out")
{
Barcount = true;
}
Any help is much appreciated.
Thanks
Comment