OPEN-SOURCE SCRIPT

Channel Lookback: Average Moving Price (CLAMP)

업데이트됨
How it works
This is a confirmation indicator based on moving averages. It compares the current price to a previous candle N periods ago, then smooths the result.
What makes this indicator novel is that it takes the smoothed curve and compares it to the previous value to see whether the slope is increasing or decreasing. Combined with a zero-cross baseline channel, we can compare the relative position of the curve, slope, or closing price to create entry signals. There are several hardcoded conditions that it checks, but this is easily changed.

Markets
The default values are best used on the SPY daily chart. With backtesting, it seemed to perform fairly well during the last year. It seems to be more accurate during choppy/bear markets, and very inaccurate during a trending market.
Eg, if you look at the period of growth that occurred during 2020, it basically said to keep shorting for months at a time. Not good. If you look at other markets (such as gold or uranium), it worked, but only if you inversed what the signal told you to do (eg going long when it says to go short). This is something you will have to test yourself, since every system and market is different. Please don't use this indicator by itself.

How to use
When combined with other indicators, this tells you whether to go long (green), go short (red), or no trade (gray). It is meant to be used as a confirmation indicator, so it will help verify other trade signals.
You can sometimes ignore the first grey circle and reuse the previous colored signal. There are a few markets (such as gold) I noticed this was helpful on; this will depend on your own trade rules and indicator system.
If you enable "simple mode" on the settings, it will draw only the final signal (long, short, no signal). I included this because it helps to reduce visual clutter.
릴리즈 노트
Updated to hopefully be easier to use / less clutter in the code. Usage is still pretty much the same: green dots are a long signal, red dots are a short signal. The color is determined simply by the color of the slope (blue/downward slope is a short signal, yellow/upward slope is a long signal).

You can make your own copy and attach additional rules in your own code, which can account for lines crossing, whether the dots are in one of the channels, etc.

As long as your baseline's signals agree with the color of the dots, it seems to be pretty reliable, but of course everyone trades a different system so please test it thoroughly.
릴리즈 노트
- Removed "simple mode" setting
- Added "draw shape" setting
- Instead of circles, output shapes are now triangles or crosses. The logic is the same as before but the trend is now more obvious. When the line is yellow it is a bullish trend; if the symbol is higher than the previous value, it will be an upward green triangle. If the symbol is lower than the previous value (moving against the trend), it will be a green X. This shows that a possible reversal in the trend may be forming.
Bands and ChannelsconfirmationMoving Averagesnnfx

오픈 소스 스크립트

진정한 TradingView 정신에 따라, 이 스크립트의 저자는 트레이더들이 이해하고 검증할 수 있도록 오픈 소스로 공개했습니다. 저자에게 박수를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 출판물에서 이 코드를 재사용하는 것은 하우스 룰에 의해 관리됩니다. 님은 즐겨찾기로 이 스크립트를 차트에서 쓸 수 있습니다.

차트에 이 스크립트를 사용하시겠습니까?

면책사항