OPEN-SOURCE SCRIPT

How To Use Dynamic Zones

已更新
Example of how to apply and use Dynamic Zones with an indicator by injecting it's source into my adaptation of the original idea by Leo Zamansky, Ph.D., and David Stendahl.

• Load your desired oscillating indicator on your chart (CCI, RSI, etc).

• Load my "How To Use Dynamic Zones" indicator on your chart.

• In the "How To Use Dynamic Zones" indicator settings choose your desired oscillating indicator as the Oscillator Source.

You will now have dynamic overbought and oversold levels. I have also included alerts which may be used to indicate when these conditions occur.

If desired you may repeat the above process by loading additional indicators along with additional copies of my indicator to use with each oscillator.

Oscillator Source: CLOSE uses your chosen indicator as a source or you may use price as a source
Sample Length: 70 uses number of previous values for evaluating
Hi is Above X% of Sample: 88 sets overbought zone
Lo is Below X% of Sample: 88 sets oversold zone

The simplest explanation of what these default settings are doing is that they take 70 previous values of your chosen indicator, then create an overbought level that is above 88% of those previous values and an oversold level that is below 88% of those previous values. As new bars form the levels are dynamically reevaluated and updated.

---
"This investing style follows a very simple form of logic: Enter the market only when an oscillator has moved far above or below traditional trading levels. However, these oscillator driven systems lack the ability to evolve with the market because they use fixed buy and sell zones. Traders typically use one set of buy and sell zones for a bull market and substantially different zones for a bear market. And therein lies the problem.

Once traders begin introducing their market opinions into trading equations, by changing the zones, they negate the system’s mechanical nature. The objective is to have a system automatically define its own buy and sell zones and thereby profitably trade in any market — bull or bear. Dynamic zones offer a solution to the problem of fixed buy and sell zones for any oscillator-driven system."

Reference: Stocks & Commodities V15:7 (306-310): Dynamic Zones by Leo Zamansky, Ph.D., and David Stendahl

---
NOTICE: This is an example script and not meant to be used as an actual strategy. By using this script or any portion thereof, you acknowledge that you have read and understood that this is for research purposes only and I am not responsible for any financial losses you may incur by using this script!
版本注释
Added error checking with minval and maxval for the percent inputs.
版本注释
Updated for Pine Script v5.
dynamicexamplehowtolevelsOscillatorsoverboughtoversoldTrend AnalysistutorialVolumezones

开源脚本

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

想在图表上使用此脚本?


lux ex tenebris • deuro mea umbra absens • Telegram: t.me/allanster
更多:

免责声明