HPotter

Bull And Bear Balance Indicator

Hi
Let me introduce my Bull And Bear Balance Indicator script.
This new indicator analyzes the balance between bullish and
bearish sentiment.
One can cay that it is an improved analogue of Elder Ray indicator.
To get more information please see "Bull And Bear Balance Indicator"
by Vadim Gimelfarb

สคริปต์โอเพนซอร์ซ

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

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

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

ต้องการที่จะใช้สคริปต์นี้บนชาร์ตใช่ไหม?
////////////////////////////////////////////////////////////
//  Copyright by HPotter v1.0 14/04/2014
//    This new indicator analyzes the balance between bullish and
//    bearish sentiment.
//    One can cay that it is an improved analogue of Elder Ray indicator.
//    To get more information please see "Bull And Bear Balance Indicator" 
//    by Vadim Gimelfarb. 
////////////////////////////////////////////////////////////

study(title = "Bull And Bear Balance Indicator")
value = iff (close < open , //then 
            iff (close[1] > open ,  max(close - open, high - low), high - low), // else
            iff (close > open, //then
                iff(close[1] > open, max(close[1] - low, high - close), max(open - low, high - close)), //else
                iff(high - close > close - low, //then
                    iff (close[1] > open, max(close[1] - open, high - low), high - low), //else
                    iff (high - close < close - low, //then
                        iff(close > open, max(close - low, high - close),open - low), //else
                        iff (close > open, max(close[1] - open, high - close),//else
                            iff(close[1] < open, max(open - low, high - close), high - low))))))

value2 = iff (close < open , //then 
            iff (close[1] < open ,  max(high - close[1], close - low), max(high - open, close - low)), // else
            iff (close > open, //then
                iff(close[1] > open,  high - low, max(open - close[1], high - low)), //else
                iff(high - close > close - low, //then
                    iff (close[1] < open, max(high - close[1], close - low), high - open), //else
                    iff (high - close < close - low, //then
                        iff(close[1] > open,  high - low, max(open - close, high - low)), //else
                        iff (close[1] > open, max(high - open, close - low),//else
                            iff(close[1] < open, max(open - close, high - low), high - low))))))


nBBB = value2 - value
nBBBc = nBBB < 0 ? red : blue
plot(nBBB, style=line, linewidth=1, color=nBBBc)
plot(nBBB, style=histogram, linewidth=1, color=gray)