ZenAndTheArtOfTrading

Dynamic Support & Resistance

This indicator paints the background of the chart between 2 EMAs when all 3 given EMAs are in sync.

The default settings are:

Long-term EMA: 200 Period.
Short-term EMA 1: 50 Period.
Short-term EMA 2: 20 Period.

So according to the default settings, when the 20EMA is above the 50EMA, and the 50EMA is above the 200EMA, the area between the 20EMA and the 50EMA will turn green. When the 20EMA is below the 50EMA, and the 50EMA is below the 200EMA, the area will turn red. When the EMAs are all over the place (ie. price is consolidating), the area will be painted white.

You can change the colors in the indicator settings menu. To remove the white background, change the transparency to 100%. Unfortunately pinescript does not allow you to do this using code, otherwise I would have made that a default feature.

Enjoy! Let me know if you have any questions.

Regards,
- Matt
版本注释:
Fixed EMA inputs being in the wrong order.
版本注释:
Minor improvements.
版本注释:
Minor improvements
版本注释:
Minor improvements
版本注释:
- Updated to Pine Script v4
版本注释:
Optimized code to be more efficient
版本注释:
Updated to Pine Script v5

My Resources Hub: theartoftrading.com
FREE YouTube Lessons: rebrand.ly/zyt
FREE Pine Script Basics Course: rebrand.ly/zpsbc
Pine Script MASTERY Course: rebrand.ly/zpsmc
My Indicators & Strategies: rebrand.ly/zmisc
开源脚本

本着真正的TradingView精神,该脚本的作者将其开源发布,以便交易者可以理解和验证它。为作者喝彩!您可以免费使用它,但在出版物中重复使用此代码受网站规则的约束。 您可以收藏它以在图表上使用。

免责声明

这些信息和出版物并不意味着也不构成TradingView提供或认可的金融、投资、交易或其它类型的建议或背书。请在使用条款阅读更多信息。

想在图表上使用此脚本?