PROTECTED SOURCE SCRIPT
John M Oscillator with Zero-Cross Range Scaling

This oscillator tries to measure momentum by comparing the current price to the Heikin Ashi open price, then scales that signal based on how much the price has moved since the last time the signal crossed zero. This makes the strength of the move relative to the recent market activity, which can help identify overbought/oversold zones more adaptively than traditional oscillators.
Helps you spot trend shifts early by watching for zero crossings.
The scaling helps you judge if the trend is weak or strong, instead of just relying on absolute price movement.
Ideal for momentum-based entries/exits, divergence spotting, and avoiding fakeouts.
Components:
1. Heikin Ashi Values:
- Heikin Ashi open is the average of the previous period's open and close.
- Heikin Ashi close is the average of the current period's open, high, low, and close.
2. Basic Oscillator Calculation:
- Calculated by subtracting the Heikin Ashi open from the current close price.
3. Smoothing:
- An EMA is applied to the basic oscillator value for noise reduction.
4. Zero-Cross Range Scaling:
- Identifies the range between the last two zero crossings.
- Finds the largest candle range (High to Low) within this zero-cross range.
- Scales the oscillator as a percentage of this largest range.
5. Color Coding:
- The oscillator plot is green when positive and red when negative.
6. Reference Lines:
- Horizontal lines are drawn at -100, -80, -70, -50, 0, 50, 70, 80, and 100 for reference.
Use Case:
This oscillator helps traders identify trends and momentum with a percentage scale based on recent price action. The scaling provides a view of the oscillator's strength relative to the most significant price movement since the last trend change, making it easier to identify potential reversals or trend continuations
Note: the script is set to default time frame of 6hr. Personally, i use the 1 hr time frame. play with it to find what works for your style of trading.
Helps you spot trend shifts early by watching for zero crossings.
The scaling helps you judge if the trend is weak or strong, instead of just relying on absolute price movement.
Ideal for momentum-based entries/exits, divergence spotting, and avoiding fakeouts.
Components:
1. Heikin Ashi Values:
- Heikin Ashi open is the average of the previous period's open and close.
- Heikin Ashi close is the average of the current period's open, high, low, and close.
2. Basic Oscillator Calculation:
- Calculated by subtracting the Heikin Ashi open from the current close price.
3. Smoothing:
- An EMA is applied to the basic oscillator value for noise reduction.
4. Zero-Cross Range Scaling:
- Identifies the range between the last two zero crossings.
- Finds the largest candle range (High to Low) within this zero-cross range.
- Scales the oscillator as a percentage of this largest range.
5. Color Coding:
- The oscillator plot is green when positive and red when negative.
6. Reference Lines:
- Horizontal lines are drawn at -100, -80, -70, -50, 0, 50, 70, 80, and 100 for reference.
Use Case:
This oscillator helps traders identify trends and momentum with a percentage scale based on recent price action. The scaling provides a view of the oscillator's strength relative to the most significant price movement since the last trend change, making it easier to identify potential reversals or trend continuations
Note: the script is set to default time frame of 6hr. Personally, i use the 1 hr time frame. play with it to find what works for your style of trading.
Mã được bảo vệ
Tập lệnh này được đăng dưới dạng mã nguồn đóng. Tuy nhiên, bạn có thể tự do sử dụng tập lệnh mà không có bất kỳ hạn chế nào – tìm hiểu thêm tại đây.
Thông báo miễn trừ trách nhiệm
Thông tin và ấn phẩm không có nghĩa là và không cấu thành, tài chính, đầu tư, kinh doanh, hoặc các loại lời khuyên hoặc khuyến nghị khác được cung cấp hoặc xác nhận bởi TradingView. Đọc thêm trong Điều khoản sử dụng.
Mã được bảo vệ
Tập lệnh này được đăng dưới dạng mã nguồn đóng. Tuy nhiên, bạn có thể tự do sử dụng tập lệnh mà không có bất kỳ hạn chế nào – tìm hiểu thêm tại đây.
Thông báo miễn trừ trách nhiệm
Thông tin và ấn phẩm không có nghĩa là và không cấu thành, tài chính, đầu tư, kinh doanh, hoặc các loại lời khuyên hoặc khuyến nghị khác được cung cấp hoặc xác nhận bởi TradingView. Đọc thêm trong Điều khoản sử dụng.