OPEN-SOURCE SCRIPT
업데이트됨

Grucha Percentage Index (GPI) V2

1 763
Grucha Percentage Index originally created by Polish coder named Grzegorz Antosiewicz in 2011 as mql code. This code is adapted by his original code to tradingview's pinescript.

What Does it Do
GPI is an oscillator that finds the lowest/highest prices with certain depth and generates signals by comparing the bull and bear bars. It use two lines, one is the original GPI calculation, the other is the smoothed version of the original line.

How to Use
GPI can catch quick volatility based movements and can be used as a confirmation indicator along with your existing trading system. When GDI (default color yellow) crosses above the GDI MA (default colored blue) it can be considered as a bullish movement and reverse can be considered as bearish movement.

How does it Work
The main calculation is done via the code below:

Pine Script®
for i=0 to length if candleC < 0 minus += candleC if candleC >= 0 plus -= candleC


Simply we are adding green and red bars seperately and then getting their percentage to the bullish movement to reflect correctly in a 0-100 z-score enviroment via the code below:

Pine Script®
res = (math.abs(minus)/sum)*100


Rest is all about plotting the results and adding seperate line with smoothing.

Note
These kind of oscillators are not designed to be used alone for signal generation but rather should be used in combination with different indicators to increase reliability of your signals.

Happy Trading.
릴리즈 노트
Changed default input titles and also added default alerts for crossovers.
릴리즈 노트
- Added MTF selection
- Added smoothing type selection
- Added horizontal lines for better viewing

면책사항

이 정보와 게시물은 TradingView에서 제공하거나 보증하는 금융, 투자, 거래 또는 기타 유형의 조언이나 권고 사항을 의미하거나 구성하지 않습니다. 자세한 내용은 이용 약관을 참고하세요.