I define these as consecutive days where the high is higher than the previous high and low is greater or equal to the day before. The reverse for down drafts. The meat of most moves will, more often than not, comprise of these runs.
I would love if someone could build a study that not only tests this idea, but also uses this as a direction bias on a higher period but trade on a shorter period. Ex. If previous Day bar was part of an UP RUN, take only long signals on the same indicator for a 5 minute period.
The stops would naturally be the previous day(period) high plus one tick for shorts and the previous day(period) low minus one tick for longs.
I have tested this on other systems for only one period but never layered multiple periods. This has been a good "indicator" for me for many of my 30 years+ in the markets. Many stocks tend to follow this sort of momentum very well. Whipsaws occur often enough but are usually quite small. I have not a significant grasp of Pine yet to pull this off. My attempts were not good.
Buy: H>H AND C>C (Based on previous testing with a single time frame on Tradestation the Close part made a difference. A negative close would actually be a reversal day which is typically a sign of weakness)
For a multiple time frame, one would need to retain the direction bias as per above for say, a day chart, and then take similar signals base on the same rules for the lower time frame but only the signals in the direction of the day time frame.
As above, and inside day retains the signal or direction of the prior bar.
Feel free, if you are so inclined, to test other indicators on the smaller time frame.
Buy should be; H>H previous AND C>C previous
Short: LH previous