Purpose of the OsMA
OsMA (Moving Average of Oscillator) is the difference between the MACD main line and its signal line, often shown as the MACD histogram. Values above 0 mean the MACD is above its signal line; values below 0 mean it is below.
How It Works
When you select OsMA in the Trade Rule block, you can configure it with the following settings:
Fast EMA Period of OsMA
The number of candles for the fast moving average (standard: 12).
Slow EMA Period of OsMA
The number of candles for the slow moving average (standard: 26).
Signal Period of OsMA
The number of candles for the signal line (standard: 9).
Applied Price of OsMA (Source for calculation)
Close Price: Uses the candle's closing price.
Open Price: Uses the candle's opening price.
High Price: Uses the highest price in the candle.
Low Price: Uses the lowest price in the candle.
Median Price: (High + Low) ÷ 2
Typical Price: (High + Low + Close) ÷ 3
Weighted Price: (High + Low + Open + Close) ÷ 4
Time Frame of OsMA
Sets the chart time frame for the OsMA calculation.
Can be replaced with a variable or input for quick testing and optimization.
Candle ID of OsMA
Defines which candle the calculation starts from.
0: Current candle (still forming).
1: Most recently closed candle.
Higher IDs refer to older candles.
Adjust of OsMA (Modify the Result)
Apply an adjustment to the calculated value by adding, subtracting, multiplying, or dividing by a number.
Example
If you set:
Fast EMA Period: 12
Slow EMA Period: 26
Signal Period: 9
Candle ID: 1
You get the OsMA value of the most recently closed candle. A value above 0 means the MACD line is above its signal line.
Use Cases
Use a zero-line cross instead of watching two MACD lines cross.
Detect weakening momentum when the OsMA shrinks toward 0.
Spot divergence between price and the OsMA.
⚠ Tip: OsMA values are in price units, so their size differs per symbol. Compare them with 0 rather than with a fixed number.

