has the following requirements:
set N minutes to monitor the rise or fall of a stock by X% within N minutes, then notify the user.
how is it more efficient?
the stupidest way to achieve the above demand is to calculate whether the increase is a hit based on the current price tracing the highest or lowest price in the first N minutes.
but I feel that this algorithm is not efficient. Is there a better algorithm?