OPEN-SOURCE SCRIPT
Sentinels

Sentinels is a playful variation on combining different mean averages (MA).
A cross of 2 user-defined MA's (MA 1 & MA 2) initiates the drawing of a sentinel with tentacles, which, on its turn can provide potential support/resistance or entry/stop-loss/take profit zones.

The type of each MA (MA 1, MA 2 and tentacles) can be chosen from following options:
🔹 Examples

Fast & slow MA: HullMA, Tentacles: TEMA

Fast & slow MA: SMA, Tentacles: WMA

Fast & slow MA: WMA, Tentacles: WMA

Fast & slow MA: TEMA, Tentacles: TEMA
🔶 DETAILS
🔹 Head-Body
The head-body is formed by:



The color of the head-body is a gradient which can be set. The color of the tentacles (non-gradient) can be set as well.
The head-body of the sentinel will be visible for maximum 60 bars after a cross has occured.
🔹 Tentacles
The length of the 'Tentacles' is calculated by taking the difference between the length of MA 1 and MA 2 , and dividing this by 6 -> diff.
The length of each tentacle is MA 1 + a multiple of diff.
The tentacles will only begin to show from 2 bars after a cross.
Each tentacle will be shown maximum x bars after the cross:
Tentacle 1: 15 bars
Tentacle 2: 20 bars
Tentacle 3: 25 bars
Tentacle 4: 30 bars
Tentacle 5: 35 bars
Tentacle 6: 40 bars
🔹 Switch lengths


By switching lengths the colors get switched too.
Note that the tentacles act differently though.
In that way, this can be an extra option to visualize the tentacles.
🔶 Happy Holidays
Merry Christmas and a Happy New Year!
A cross of 2 user-defined MA's (MA 1 & MA 2) initiates the drawing of a sentinel with tentacles, which, on its turn can provide potential support/resistance or entry/stop-loss/take profit zones.
The type of each MA (MA 1, MA 2 and tentacles) can be chosen from following options:
- SMA
- EMA
- SMMA (RMA)
- HullMA
- WMA
- VWMA
- DEMA
- TEMA
🔹 Examples
Fast & slow MA: HullMA, Tentacles: TEMA
Fast & slow MA: SMA, Tentacles: WMA
Fast & slow MA: WMA, Tentacles: WMA
Fast & slow MA: TEMA, Tentacles: TEMA
🔶 DETAILS
🔹 Head-Body
The head-body is formed by:
- the slow MA when there is a crossunder.
- the fast MA when there is a crossover.
The color of the head-body is a gradient which can be set. The color of the tentacles (non-gradient) can be set as well.
The head-body of the sentinel will be visible for maximum 60 bars after a cross has occured.
🔹 Tentacles
The length of the 'Tentacles' is calculated by taking the difference between the length of MA 1 and MA 2 , and dividing this by 6 -> diff.
The length of each tentacle is MA 1 + a multiple of diff.
The tentacles will only begin to show from 2 bars after a cross.
Each tentacle will be shown maximum x bars after the cross:
Tentacle 1: 15 bars
Tentacle 2: 20 bars
Tentacle 3: 25 bars
Tentacle 4: 30 bars
Tentacle 5: 35 bars
Tentacle 6: 40 bars
🔹 Switch lengths
By switching lengths the colors get switched too.
Note that the tentacles act differently though.
In that way, this can be an extra option to visualize the tentacles.
🔶 Happy Holidays
Merry Christmas and a Happy New Year!
Skrip sumber terbuka
Dalam semangat sebenar TradingView, pencipta skrip ini telah menjadikannya sumber terbuka supaya pedagang dapat menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupun anda boleh menggunakannya secara percuma, ingat bahawa menerbitkan semula kod ini adalah tertakluk kepada Peraturan Dalaman kami.
Who are PineCoders?
tradingview.com/chart/SSP/yW5eOqtm-Who-are-PineCoders/
TG Pine Script® Q&A: t.me/PineCodersQA
- We cannot control our emotions,
but we can control our keyboard -
tradingview.com/chart/SSP/yW5eOqtm-Who-are-PineCoders/
TG Pine Script® Q&A: t.me/PineCodersQA
- We cannot control our emotions,
but we can control our keyboard -
Penafian
Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.
Skrip sumber terbuka
Dalam semangat sebenar TradingView, pencipta skrip ini telah menjadikannya sumber terbuka supaya pedagang dapat menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupun anda boleh menggunakannya secara percuma, ingat bahawa menerbitkan semula kod ini adalah tertakluk kepada Peraturan Dalaman kami.
Who are PineCoders?
tradingview.com/chart/SSP/yW5eOqtm-Who-are-PineCoders/
TG Pine Script® Q&A: t.me/PineCodersQA
- We cannot control our emotions,
but we can control our keyboard -
tradingview.com/chart/SSP/yW5eOqtm-Who-are-PineCoders/
TG Pine Script® Q&A: t.me/PineCodersQA
- We cannot control our emotions,
but we can control our keyboard -
Penafian
Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.