i want to have a condition called uptrend when these conditions are met (i don't know if a boolean variable would work):
if (Rising(smav) && Rising(emav) && Rising(hmav))
now, i would like the strategy to keep a count of how many consecutive bars this condition has been true for (or confirmed) and only act after a minimum count that i could define as an input has been met or exceeded.
let's say i define a variable as trendcount and the input is 3.
then, the counter for this uptrend condition would only follow through with the actions i code after 3 consecutive bars have met the conditions defined as uptrend in this case.
thanks.
Comment