OPEN-SOURCE SCRIPT

Multi Bar OHLC Compare Panel (Floating Grid)

업데이트됨
Multi Bar OHLC Compare Panel by RagingRocketBull 2019
version 1.0

This indicator lets you compare OHLCV values from several specified bars. Bars can be dynamic/persistent.
You can also use it as an alternate OHLC panel if you don't like small font of the native TradingView panel.
It uses Pinescript v4 to output data dynamically as string labels in a horiz/vertical grid.

Features:
- Floating Panel with customizable horiz/vertical layout and grid spacing
- Support for up to 5 OHLC bars (highlighted with markers)
- Outputs Bar #/index, OHLCV, Bar Change Value/%, Exchange/Ticker, Timeframe, Timestamp strings
- Dynamic (fixed offset)/Persistent bars (fixed time)
- Show/Hide parts of strings
- Full output string customization, including text size, date/time format and delimiters
- 2 Anchor points for panel offset: cur bar high or range high
- Bar Change can change color

Usage:
- specify at least 1 bar index as OHLC source
- select anchor point to position the panel
- select horiz/vertical grid layout
- adjust horiz/vertical spacing
- customize output strings as needed

Notes:
- this indicator uses Pinescript v3 Compatibity Framework
- both bars 1,2 are required for log scale adjustment to work
- you can't attach the panel to screen's top/bottom and must use offset/anchor because, unlike plotshape, string labels don't support yloc=yloc.top/bottom, only yloc.above/belowbar
- you can't precisely align strings in a grid because there's no label.get_width/height to calculate mid/left points, only get_x/y/text. Alignment will break depending on string length, zoom and change color option on/off
- bar change is rendered as a separate label when change color is enabled (2 panels total) and merged into the main panel when disabled (single panel)
- you can't change the order of strings as playing with the natural order of things isn't the best of ideas
- you can modify the script to compare up to 50 OHLC bars, but do you need that much power? Of course, you do.
- you can't set color/style for string labels in Style UI, so a few extra settings were added.
- bar index is limited to 5000 for free accounts (10000 for paid), will show an error when exceeded, also when it exceeds the total number of bars in history
- in persistent bars mode all bars with index > 0 are considered persistent, bar 0 always remains a dynamic bar
- persistent bars' offset is reset: in replay mode on exit or when price reaches cur bar, or when panel layout is changed from h to v in both replay/realtime modes
- initial pos of each persistent bar relative to the first realtime bar anchor doesn't change during session - new persistent bars introduced during session are attached to the most recent cur bar anchor


P.S. Everything is proceeding as I have foreseen


릴리즈 노트
Multi Bar OHLC Compare Panel by RagingRocketBull 2019
version 2.0

Changes in ver 2.0:

Features:
- 10 OHLC bars
- removed max_bars_back=5000 => error: too large total max_bars_back 550022 max 300000 allowed
- tuple delimiter
- ticker label
Candlestick AnalysiscomparedynamicfloatingGRIDinformationohlcpanelstrings

오픈 소스 스크립트

진정한 TradingView 정신에 따라, 이 스크립트의 저자는 트레이더들이 이해하고 검증할 수 있도록 오픈 소스로 공개했습니다. 저자에게 박수를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 출판물에서 이 코드를 재사용하는 것은 하우스 룰에 의해 관리됩니다. 님은 즐겨찾기로 이 스크립트를 차트에서 쓸 수 있습니다.

차트에 이 스크립트를 사용하시겠습니까?

면책사항