OPEN-SOURCE SCRIPT
OI: Simple Band

OI: Simple Band (Open Source)
OI: Simple Band is a very simple, open-source overlay that draws a two-line moving-average band and fills the space between them to highlight trend bias and momentum shifts at a glance.
What it plots
EMA (Exponential Moving Average) using the selected length
SMMA (Smoothed Moving Average) using the same length
A ribbon fill between the two:
Green when EMA > SMMA (bullish bias)
Red when EMA < SMMA (bearish bias)
Why use two different MAs with the same length?
Even with the same length, these two averages react differently:
EMA weights recent prices more heavily, so it responds faster to changes.
SMMA is designed to be steadier and slower, filtering more noise.
Using the same length keeps the comparison fair (same smoothing window) while still giving you a “fast vs slow response” relationship. The distance and relationship between them becomes a simple way to see:
Momentum / pressure: When EMA pulls away from SMMA, price is moving with enough force to overcome smoothing.
Compression: When they converge, momentum is fading and conditions often look more “balanced.”
State changes: Crossovers flip the ribbon colour and can be used as a context shift (trend/bias filter), not a standalone entry/exit rule.
Inputs
Moving average band (length): Controls both EMA and SMMA smoothing.
SMMA Source: Chooses the data used for the SMMA calculation (EMA is calculated on close).
Notes
This is intentionally minimal: no higher-timeframe requests, no security() calls, no signals — just a clean visual band.
Like all moving averages, it updates on the live candle and will settle on bar close.
OI: Simple Band is a very simple, open-source overlay that draws a two-line moving-average band and fills the space between them to highlight trend bias and momentum shifts at a glance.
What it plots
EMA (Exponential Moving Average) using the selected length
SMMA (Smoothed Moving Average) using the same length
A ribbon fill between the two:
Green when EMA > SMMA (bullish bias)
Red when EMA < SMMA (bearish bias)
Why use two different MAs with the same length?
Even with the same length, these two averages react differently:
EMA weights recent prices more heavily, so it responds faster to changes.
SMMA is designed to be steadier and slower, filtering more noise.
Using the same length keeps the comparison fair (same smoothing window) while still giving you a “fast vs slow response” relationship. The distance and relationship between them becomes a simple way to see:
Momentum / pressure: When EMA pulls away from SMMA, price is moving with enough force to overcome smoothing.
Compression: When they converge, momentum is fading and conditions often look more “balanced.”
State changes: Crossovers flip the ribbon colour and can be used as a context shift (trend/bias filter), not a standalone entry/exit rule.
Inputs
Moving average band (length): Controls both EMA and SMMA smoothing.
SMMA Source: Chooses the data used for the SMMA calculation (EMA is calculated on close).
Notes
This is intentionally minimal: no higher-timeframe requests, no security() calls, no signals — just a clean visual band.
Like all moving averages, it updates on the live candle and will settle on bar close.
نص برمجي مفتوح المصدر
بروح TradingView الحقيقية، قام مبتكر هذا النص البرمجي بجعله مفتوح المصدر، بحيث يمكن للمتداولين مراجعة وظائفه والتحقق منها. شكرا للمؤلف! بينما يمكنك استخدامه مجانًا، تذكر أن إعادة نشر الكود يخضع لقواعد الموقع الخاصة بنا.
إخلاء المسؤولية
لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.
نص برمجي مفتوح المصدر
بروح TradingView الحقيقية، قام مبتكر هذا النص البرمجي بجعله مفتوح المصدر، بحيث يمكن للمتداولين مراجعة وظائفه والتحقق منها. شكرا للمؤلف! بينما يمكنك استخدامه مجانًا، تذكر أن إعادة نشر الكود يخضع لقواعد الموقع الخاصة بنا.
إخلاء المسؤولية
لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.