HPotter

Trade Session

Marker of trade session
If you do not want painting all session, you should set -1 in the SessionStart
and SessionEnd

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

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

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

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

ต้องการที่จะใช้สคริปต์นี้บนชาร์ตใช่ไหม?
////////////////////////////////////////////////////////////
//  Copyright by HPotter v1.0 03/09/2014
//  Marker of trade session
//  If you do not want painting all session, you should set -1 in the SessionStart 
//  and SessionEnd
////////////////////////////////////////////////////////////
study(title="Trade Session", overlay = true)
Session0Start = input(0)
Session0End = input(4)
Session1Start = input(5)
Session1End = input(7)
Session2Start = input(8)
Session2End = input(14)
Session3Start = input(15)
Session3End = input(19)
Session4Start = input(20)
Session4End = input(23)
BGColor0 = iff(hour >= Session0Start and hour <= Session0End, green, na)
BGColor1 = iff(hour >= Session1Start and hour <= Session1End, blue, na)
BGColor2 = iff(hour >= Session2Start and hour <= Session2End, red, na)
BGColor3 = iff(hour >= Session3Start and hour <= Session3End, gray, na)
BGColor4 = iff(hour >= Session4Start and hour <= Session4End, olive, na)
bgcolor(BGColor0, 80, 0)
bgcolor(BGColor1, 80, 0)
bgcolor(BGColor2, 80, 0)
bgcolor(BGColor3, 80, 0)
bgcolor(BGColor4, 80, 0)