OPEN-SOURCE SCRIPT

Copy/Paste Levels

Zaktualizowano
Copy/Paste Levels allows levels to be pasted onto your chart from a properly formatted source.
This tool streamlines the process of adding lines to your chart, and sharing lines from your chart.
More than one ticker at a time!
This indicator will only draw lines on charts it has values for!
This means you can input levels for every ticker you need all at once, one time, and only be displayed the levels for the current chart you are looking at. When you switch tickers, the levels for that ticker will display. (Assuming you have levels entered for that ticker)

The formatting is as follows:
Ticker,Color,Style,Width,Lvl1,Lvl2,Lvl3;

Ticker - Any ticker on Tradingview can be used in the field
Color - Available colors are: Red,Orange,Yellow,Green,Blue,Purple,White,Black,Gray
Style - Available styles are: Solid,Dashed,Dotted
Width - This can be any negative integer, ex.(-1,-2,-3,-4,-5)
Lvls - These can be any positive number (decimals allowed)
Semi-Colons separate sections, each section contains enough information to create at least 1 line.

Each additional level added within the same section will have the same styling parameters as the other levels in the section.
Example:
2 solid lines colored red with a thickness of 2 on QQQ, 1 at $300 and 1 at $400.
QQQ,RED,SOLID,-2,300,400;

IMPORTANT MUST READ!!!
Remember to not include any spaces between commas and the entries in each field!
ex. ; QQQ, red, dotted, -1, 325; <- Wrong
ex. ;QQQ,red,dotted,-1,325;)<- Right
However,
All fields must be filled out, to use default values in the fields, insert a space between the commas.

ex. ;QQQ,red,dotted,,325; <- Wrong
ex. ;QQQ,red,dotted, ,325; <- Right

While spaces can not be included line breaks can!
I recommend for easier typing and viewing to include a line break for each new line (if changing styling or ticker)
Example:
2 solid lines, one red at $300, one green at $400, both default width. Written in a single line AND using multiple lines, both give the same output.
QQQ,red,solid, ,300;QQQ,green,solid, ,400;
or
QQQ,red,solid, ,300;
QQQ,green,solid, ,400;

In this following screenshot you can see more examples of different formatting variations.
https://www.tradingview.com/x/DONdlAHi/
The textbox contains exactly what is pasted into the settings input box.
As you can see, capitalization does not matter.

Default Values:
Color = optimal contrast color, If this field is filled in with a space it will display the optimal contrast color of the users background.
Style = solid
Width = -1

More Examples:

Multi-Ticker: drawing 3 lines at $300, all default values, on 3 different tickers
SPY, , , ,300;QQQ, , , ,300;AAPL, , , ,300
or
SPY, , , ,300;
QQQ, , , ,300;
AAPL, , , ,300

Multiple levels: There is no limit* to the number of levels that can be included within 1 section.
* only TV default line limit per indicator (500)
This will be 4 lines all with the same styling at different values on 2 separate tickers.
SPY,BLUE,SOLID,-2,100,200,300,400;QQQ,BLUE,SOLID,-2,100,200,300,400
or
SPY,BLUE,SOLID,-2,100,200,300,400;
QQQ,BLUE,SOLID,-2,100,200,300,400

Semi-colons must separate sections, but are not required at the beginning or end, it makes no difference if they are or are not added.
SPY,BLUE,SOLID,-2,100,200,300,400;
QQQ,BLUE,SOLID,-2,100,200,300,400
==
SPY,BLUE,SOLID,-2,100,200,300,400;
QQQ,BLUE,SOLID,-2,100,200,300,400;
==
;SPY,BLUE,SOLID,-2,100,200,300,400;
QQQ,BLUE,SOLID,-2,100,200,300,400;

All the above output the same results.

Hope this is helpful for people,
Enjoy!
Informacje o Wersji
-removed minor redundancy in the code
Informacje o Wersji
https://www.tradingview.com/x/Qk1pl36B/
-Added a new field for text.
-Added User option to toggle on and off the prices for labels.
-Error message now displays the current ticker.

NEW FORMAT is as follows:
Ticker,Color,Style,Width,Text,lvls;

More info about the text field:
The text field can contain everything other than commas(,) and semi-colons(;).
These characters will mess with the formatting system, do not use them.
All text will be uppercase. Spaces are allowed in this box!
The text field will still need a space left in it when not in use.
Regardless of the text field, the value of the line will still be displayed next to it. This can be toggled on and off by the user.
Informacje o Wersji
Re-worked the system a little bit, found an error with the way it was detecting tickers.
Found it because of the text feature, but it could happen with normal tickers too.
It was checking if the current ticker you were on was contained anywhere within the entire line of inputs.
Ex. If you had "Target" in the text field, if you went on the "TA" chart you would have levels from whichever levels had "target" as the text.
I resolved this for drawing levels; however, I was not able to ENTIRELY resolve it for the error message functionality.
For the most part in normal use, it will not be noticed.
However, if you input a ticker and only a ticker into the text field of a level, the error message will not show up on the ticker in the text field.
So just don't do that...it doesn't make sense to do that either.
Also made the line drawing more efficient!
Informacje o Wersji
because of previous update, it was not reading line breaks properly, now it does...again...as it should!
Informacje o Wersji
reverted to the old error message, new one was causing issues.
If the ticker you are on is contained anywhere within the entire input you will not receive any error message or lines.
I'm already working on a better method for getting this method across.
Informacje o Wersji
- added some leniency for spacing in the format. I would still recommend not include spaces, but this should help if there's some forgotten ones.
Informacje o Wersji
added confirm input window when added to chart.
Informacje o Wersji
ZONE UPDATE Added the ability to create zones in between lines.
When typing the format, in the "Style" field, simply include the word "ZONE" anywhere in that field.
ex. Solid_Zone, solidzone, solidzone
All of these work with every variation (solid, dotted, dashed)
OR
If you want the default setting, entering "zone" alone will still give a zone, with solid lines.

-These zones require 2 levels in the line associated with the zone. It will not work with 3, it will not work with 1. ONLY 2.
The price text label will display both prices for levels on the zone it is displaying.

-Zone Opacity is now an option in the settings.
copypasteeducationallevelsPivot points and levelsresistance_levelsupportSupport and Resistance

Skrypt open-source

W prawdziwym duchu TradingView autor tego skryptu opublikował go jako open source, aby inwestorzy mogli go zrozumieć i zweryfikować. Pozdrowienia dla autora! Możesz go używać bezpłatnie, ale ponowne użycie tego kodu w publikacji podlega Zasadom Regulaminu. Możesz go oznaczyć jako ulubione, aby użyć go na wykresie.

Chcesz użyć tego skryptu na wykresie?


Również na:

Wyłączenie odpowiedzialności