chipmonk

Cloud Levels [Import Price Levels]

chipmonk تم تحديثه   
This script allows you to import TA and price levels from an external source. For example, you may do some TA on a different software but want to import it to TradingView. Or you may have a script or bot that calculates levels for you end-of-day. Or you may be part of a community that provides TA and levels. There are many different reasons why you may want to import levels from an external source.

All you need is a source for the data. The data format shouldn't really matter since it can usually be converted fairly easily to a custom format. Information about the necessary format can be found below.

The script currently supports:
  • Labelled lines with customs style and colors
  • Boxes / zones with custom fill color and borders
  • Fibonacci ratios

In the plans:
  • Channel support
  • Trend lines

The input format looks like this:

FIGURE 1 - Lines with labels
Columns: <start timestamp>,<price>,<label text>,<RGBA line color*>,<line style*>;
Example: 1677724019999,3976.50,Label text,255/255/0/125,sol

FIGURE 2 - Boxes
Columns: <left timestamp>,<top price>,<right timestamp>,<bottom price>,<RGBA fill color*>,<filled or not (1 | 0)>,<border width>,<RGBA border color*>;
Example: 1686715971428,4430.18,1686773561538,4409.52,68/98/194/15,1,1,153/204/255/204

FIGURE 3 - Fibonacci ratios
Columns: <start timestamp>,<start price>,<end timestamp>,<end price>,<line style*>,<extend right (1 | 0)>,<line width>,<ratios*>,<ratio colors*>
Example: 1656649151300,4588.75,1656649151300,3639,dot,1,3,0.236|0.382|0.5|0.618|0.706|0.786|0.886,170/200/255/76|170/200/255/76|170/200/255/76|0/255/0/76|255/153/0/76|255/153/0/76|255/153/0/76
*ratios and ratio colors are separated by '|'


*RGBA colors must look like this: 255/255/0/125, each value separated by '/'
*Line styles must be one of these values: dsh, sol or dot (dashed, solid or dotted)

Separate each item within the same figure with a semicolon (;), e.g for two labelled lines: 1677724019999,3976.50,Label text,255/255/0/125,sol;1677724019999,4026,Label text 2,255/255/0/125,sol
Only put a semicolon at the end if there is a new item after it.

Finally, put all figures together with '§' separator between each figure/category, in the correct order:
1 - Lines with labels
2 - Boxes
3 - Fibonacci ratios

The result looks like this for the examples above:
1677724019999,3976.50,Label text,255/255/0/125,sol§1686715971428,4430.18,1686773561538,4409.52,68/98/194/15,1,1,153/204/255/204§1656649151300,4588.75,1656649151300,3639,dot,1,3,0.236|0.382|0.5|0.618|0.706|0.786|0.886,170/200/255/76|170/200/255/76|170/200/255/76|0/255/0/76|255/153/0/76|255/153/0/76|255/153/0/76

An incorrect format will give you errors.

With basic programming skills you can create a simple tool to convert your data to this format, that's what I do. If needed, I may be able to provide a customized converting tool for this, PM if interested.
ملاحظات الأخبار:
Fixed an issue with duplicated lines and labels.
ملاحظات الأخبار:
Allow empty values for a specific figure by placing a dash (-) in between the figure sparator (§).
ملاحظات الأخبار:
  • Added FIGURE 4 - Channels. See format below.
  • Added alert support for lines and channels
  • It's now possible to add levels for up to 3 different symbols per indicator, instead of just 1.
  • Added an optional "end timestamp" for lines. Same format as before but add a timestamp to the end (or skip it to default to an extended line):
1712619257142,5214.12,Line 1,207/165/71/255,sol,1712887200000


CHANNEL data format:
,,,,,,,,,

Channel example: 2024-04-04-16-00,2024-04-10-12-00,5308.5,5267.75,5194.35,5153.6,1,1,255/255/255/255,-
Note: for now the timestamp format is different for channels because of a pine script limitation with alerts.

* Timeframe should be same format as returned by timeframe.period in pinescript ("60" for 60 minutes, "D" for one day, "2W" for two weeks, "3M" for one quarter.)
https://www.tradingview.com/pine-script-reference/v5/#var_timeframe.period

Check comments for a full up-to-date example (I can't edit example in previous release notes).

نص برمجي محمي
تم نشر هذا النص البرمجي بمصدر غير مفتوح ويمكنك استخدامه بحرية. يمكنك جعله مفضلاً لاستخدامه على الرسم البياني. لا يمكنك مشاهدة أو تعديل كود المصدر الخاص به.
إخلاء المسؤولية

لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.

هل تريد استخدام هذا النص البرمجي على الرسم البياني؟