serkany88

Grucha Percentage Index (GPI) V2

serkany88 ที่อัปเดต:   
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:

for i=0 to length
    if candleC[i] < 0
        minus += candleC[i]
    if candleC[i] >= 0
        plus -= candleC[i]

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:

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

One does not simply win every trade.
สคริปต์โอเพนซอร์ซ

ด้วยจิตวิญญาณของ TradingView อย่างแท้จริง ผู้เขียนสคริปต์นี้ได้เผยแพร่เป็นโอเพนซอร์ส เพื่อให้ผู้ค้าสามารถเข้าใจและตรวจสอบได้ ไชโยให้กับผู้เขียน! คุณสามารถใช้ได้ฟรี แต่การใช้รหัสนี้ซ้ำในสิ่งพิมพ์อยู่ภายใต้กฎระเบียบการใช้งาน คุณสามารถตั้งเป็นรายการโปรดเพื่อใช้บนชาร์ตได้

คำจำกัดสิทธิ์ความรับผิดชอบ

ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมที่ เงื่อนไขการใช้บริการ

ต้องการที่จะใช้สคริปต์นี้บนชาร์ตใช่ไหม?