KevinLemur

KLemurs Deviation

KevinLemur 已更新   
Market: Stocks and ETF's

This overlay shows the deviation of the exponential moving average of the mid candle price of the currently loaded chart, away from the exponential moving average of the S&P and DOW combined and averaged mid candle price. The top and bottom lines also give a visual perspective of what a certain percentage (default 1%) looks like on the current charts window. This may help with making quick decisions for things like setting trailing stop trades with a percentage. This can be used for stocks, ETF's, and index's and It may be useful in finding potential stocks or ETF's if you are interested in these kinds of deviations. Defaults are set for a dark screen but can be edited to your taste. It's optimized to be an overlay on the current chart window as opposed to being a separate window.

Percentage Lines (editable)
This is three lines. The upper line (default green) plots the set percentage (default 1%) above the current chart’s ema. The middle line (default white) plots the current chart’s ema. The lower line (default red) plots the set percentage (default 1%) below the current chart’s ema.

Deviation Band (editable)
This is the colored band on the overlay between the upper and lower percentage lines. The band’s fill color indicates the deviation of the current charts ema from the ema of the combined S&P and DOW’s ema as follows:


- Red (default) = Current Chart’s ema is descending and the S&P/DOW ema is descending OR the Current Chart’s ema is below (underperforming) the S&P/DOW ema.

- Orange (default) = The Current Chart and S&P/DOW ema’s are both either ascending or descending together.

- Green (default) = The Current Chart’s ema is ascending but the S&P/DOW ema is descending.


To Set Line Colors
BY default, the upper line color uses the same colors as the ascending band color and the lower line uses the same color as the descending band color. To set the line colors, see "plotColor", "plotColorUp", or" plotColorDown" in variable settings within the script or use the “Central Plot Line”, “Upper Plot Line, or “Lower Plot Line” in the input dialogue to change this.

To Set Band Colors
To set the band colors, see "plotColor", "plotColorUp", or "plotColorDown" in variable settings within the script or use the “Color0”, “Color1", or “Color2” in the input dialogue to change this.

To Set EMA Lookback Period
The ema lookback period defaults to 5. This is the number of candles back that the script will use to determine the ema. See “CCemaN” in variable settings within the script or use the “EMA Period” in the input dialogue to change this.

To Set Percentage
To set the percentage that plots the upper and lower lines, see "CCP" in variable settings within the script or use “Upper/Lower Bands Percentage” in the input dialogue to change this. The default is .01 (or 1%).




版本注释:
Changed the period of the remote charts data from "5" to "timeframe.period". This will mean the data pulled from the remote chart (S&P and DOW) will now be at the same period as the current chart instead of the default "5".
开源脚本

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

免责声明

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

想在图表上使用此脚本?