zrhe2016

Signal

This custom TradingView indicator, named "Signal," is designed to generate buy and sell signals based on the Stochastic Oscillator, a momentum indicator that compares a particular closing price of an asset to a range of its prices over a certain period of time. The indicator is set to overlay on the price chart, providing visual cues for potential trading opportunities.

Key features of the "Signal" indicator include:

1. **Dynamic Period Adjustment**: The indicator automatically adjusts its settings based on the chart's time frame. For a 1-hour (60 minutes) chart, the stochastic length is set to 15, while for a 15-minute chart, the length is set to 10.

2. **Stochastic Calculation**: It calculates the %K line as a smoothed moving average (SMA) of the stochastic ratio, and the %D line as an SMA of the %K line, with both lines smoothed over a period derived from the dynamic length setting.

3. **Signal Detection**: The indicator identifies bullish crossovers (golden crosses) when the %K line crosses above the %D line and the average of both lines is below 50. Conversely, it detects bearish crossovers (death crosses) when the %K line crosses below the %D line and the average is above 50.

4. **Signal Confirmation**: Signals are confirmed using historical data with an offset of 1 bar to ensure that the crossover is evaluated after the close of the candlestick, thus avoiding repainting issues.

5. **Visual Indicators**: Buy signals are represented by green upward-pointing triangles placed below the bars, while sell signals are indicated by red downward-pointing triangles above the bars.

6. **Alerts**: The indicator includes alert conditions for both golden crosses and death crosses, notifying users when a potential buy or sell signal has been identified based on the stochastic crossover.

This indicator can be a valuable tool for traders who follow stochastic momentum signals and prefer to have dynamic adjustments based on the chart's time frame. It is important to note that, as with all trading indicators, the "Signal" indicator should be used in conjunction with other forms of analysis to confirm trading signals and manage risk effectively.
开源脚本

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

免责声明

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

想在图表上使用此脚本?