moebius1977

arraybrowser

moebius1977 업데이트됨   
█ ARRAY BROWSER

Add you arrays to the array browser window and scroll them away left and right.
Flexible formatting options (see below).
Many thanks to @kaigouthro for his beautiful matrixautotable library. (import kaigouthro/matrixautotable/14)

How to use
Copy the "ARRAY BROWSER" commented code section below to your script and uncomment.

See DEMO section in the library for usage examples.
Basically: add() your arrays and draw() on barstate.islast.
If your script adds the arrays every calculation do not forget to clear() before adding.
Otherwise, since the arrays are added by reference, no need to add them on every bar, every time you draw() the actual values are retrieved.

Up to 10 arrays of each type (float/string/line/label/box) are supported (total 50 arrays).

Change offset in the input settings to scroll left/right.

Usage example:
import moebius1977/arraybrowser/1			as arraybrowser	// this alias is used in the copied section, so better keep it  
[...]
<COPIED "ARRAY BROWSER" SECTION> 
[...]
arbr.clear()								// clears all rows and deletes the table 
arbr.add(arrayFloat, format = "0.00")					// adds an array with title
arbr.add(arrayInt)							// adds an array without title
arbr.add(arrayTimes, "array of times 1",  "date\ntime")		        // format date and time so as to fit in the cell.
arbr.add(arrayTimes, "array of times 2", "{0, time, HH:mm}")		// format date and time so as to fit in the cell.
arbr.add(arrayString)							// 
arbr.add(arrayLine, "arrayLines", "(x1, y1)\n(x2,y2)")			// use your own format combining "x1", "y1", "x2", "y2"
arbr.add(arrayLabel, "arrayLabel", "txt")				// only print label text, no coordinates 
arbr.add(arrayBox, showIds = true)					// show ID's for this array if input setting is "individually"
arbr.draw()								// shows the table with arrays, use on barstate.islast


Formatting options

For float/int you can always use format string like "{0, time, HH:mm:ss}" or "{0.00}".
Additional options are
- --- Number formats ---
- "number"
- "0"
- "0.0"
- "0.00"
- "0.000"
- "0.0000"
- "0.00000"
- "0.000000"
- "0.0000000"
- --- Date formats ---
- "date"
- "date : time"
- "dd.MM"
- "dd"
- --- Time formats ---
- "time"
- "HH:mm"
- "mm:ss"
- "date time"
- "date, time"
- "date,time"
- "date\time"

For line and box: Empty `format` returns coordinates as "(x1, y1) - (x2, y2)". Otherwise "x1", "x2", "y1", "y2" in `format` string are replaced by values. (e.g. toS(line, "x1, x2") will only return x1 and x2 separated by comma).

For label: Empty `format` returns coordinates and text as "(x, y): text = text". Otherwise "x1", "y1", "txt" in `format` string are replaced by values. (e.g. toS(label, "txt") will only return text of the label)
릴리즈 노트:
v2 Added support for bool arrays.
Changing text color does not work temporarily.
릴리즈 노트:
v3 A minor bug fix. (in deleteRow())
릴리즈 노트:
v4 Same amendment as above.
릴리즈 노트:
v5 Added support for varip arrays. Previous versions disrupted behaviour of varip arrays.
파인 라이브러리

트레이딩뷰 정신에 따라 오써는 이 파인 코드를 오픈 소스 라이브러리로 퍼블리쉬하여 당사 커뮤니티의 다른 파인 프로그래머들이 쓸 수 있도록 하였습니다. 오써에게 찬사를! 여러분은 이 라이브러리를 프라이빗 또는 오픈 소스 퍼블리케이션에 쓸 수 있지만 퍼블리케이션에 재사용은 하우스룰을 따릅니다.

면책사항

이 정보와 게시물은 TradingView에서 제공하거나 보증하는 금융, 투자, 거래 또는 기타 유형의 조언이나 권고 사항을 의미하거나 구성하지 않습니다. 자세한 내용은 이용 약관을 참고하세요.

이 라이브러리를 쓰시겠습니까?

텍스트를 클립보드에 카피한 뒤 님의 스크립트에 붙여 넣기.