fikira

chart visible bar time

fikira Wizard ที่อัปเดต:   
With the latest added features chart.left_visible_bar_time and chart.right_visible_bar_time it is now possible to
place label.new() positions at the equivalent of 'location.top' and 'location.bottom'

The following are examples of functions which enables to find the visible chart highest/lowest bars:
highest_visible_chart() => 
    var float highs = na
    highs := time == chart.left_visible_bar_time                  ? high : 
             time >  chart.left_visible_bar_time and high > highs ? high : highs

lowest_visible_chart()  => 
    var float lows = na
    lows  := time == chart.left_visible_bar_time                  ? low  : 
             time >  chart.left_visible_bar_time and low  < lows  ? low  : lows

In this example labels are plotted when a sma crosses another sma

Also combined with 3 boxes, scrolling gives insights how the features work

To all who make Tradingview the way it is, lots and lots of thanks!

Cheers!
เอกสารเผยแพร่:
Added label which gives the current time and time from left & right bar of the visible chart (adjustable by UTC)

In this case the label is not deleted through code on each new bar, because the script is reloaded every bar
(due to chart.right_visible_bar_time, chart.left_visible_bar_time), hence 'starting with a clean slate'
เอกสารเผยแพร่:
+ extra information regarding time format
เอกสารเผยแพร่:
update
เอกสารเผยแพร่:
Added label which keeps track of latest price, even if you scrolling back
เอกสารเผยแพร่:
This script is part of a collection of educational scripts
If you want to return to the open source INDEX page, click here
-> Education: INDEX

LuxAlgo Dev: www.luxalgo.com
PineCoder: www.pinecoders.com

- We cannot control our emotions,
but we can control our keyboard -
สคริปต์โอเพนซอร์ซ

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

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

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

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