Trend power
A 0-to-1 bullish trend score: high when EMAs stack upward with price above them, near 0 in any downtrend.
TrendPower sums six parts into one number from 0 to 1, each part with a fixed weight. The parts are the EMA stack order (25%), the gaps between the three EMAs as a share of price (20%), the rate of change over roc_window bars (20%), that rate's change from the previous bar (15%), where price sits against the EMAs (15%), and ATR as a share of price (5%). Only upward structure adds to the score, apart from the small volatility part, so a falling market drops to a floor near 0 rather than registering as a strong negative.
How to read it
- The line sits in its own pane below the price and stays between 0 and 1 by construction.
- On a month of SPY one-minute bars it stayed under 0.53: the median minute was about 0.25 and the top 5% sat above 0.41.
- It moves in steps, because the stack order and price position each jump between a few fixed levels. Sustained readings near 0.4 and above mean the EMAs are stacked upward with price above them.
- It drops to the floor near 0 only when the EMAs are fully stacked down, price is below the slow EMA and momentum is negative.
What it outputs
- Trend power
- A 0-to-1 bullish trend score built from EMA order, price position, momentum and volatility.
Settings
- ema_short
- Length of the fastest EMA. Shorter makes the stack order and price-above-EMA steps flip more often, so the line jumps more. Longer keeps those steps steady but lags turns.
- ema_medium
- Length of the middle EMA. Lowering it tracks price more closely, so the stack order flips more often. Raising it smooths the stack and lags turns more.
- ema_long
- Length of the slowest EMA. Raising it lags the anchor further behind price, so the price-above-slow-EMA step and the stack order hold longer after a turn. Lowering it makes those steps flip more often.
- roc_window
- Bars the rate of change looks back over. Longer windows give a bigger rate of change for a steady move, so the momentum part rises. Shorter windows react to every wiggle.
- atr_window
- Bars the ATR averages over. Longer averages react more slowly to volatility changes. The volatility part is 5% of the score and tiny on one-minute SPY, so this barely changes the chart.
Pitfalls
- It scores bullish structure, not trend strength: a steep fall lands at the same floor as a quiet slide, so a low reading does not mean a strong bear trend.
- On one-minute SPY the spacing, momentum and volatility parts are small, so most of the line comes from EMA order and price position, which change in steps.
- The facts show the output's shape on one month of data, not whether high readings lead price moves. Its correlation with the close is about 0.05.