First Steps: Introduction to Pine Script Welcome back, fellow traders, to another exciting episode of our Pine Script™ journey! In our previous video, we explored how to use existing scripts and indicators on TradingView. Today, we'll take the next step and dive into the fascinating world of reading and writing Pine Script™.
In this episode, we'll focus on the fundamental aspects of reading Pine Script™ code and understanding its structure. By studying the code written by talented programmers, we can gain valuable insights and improve our own understanding of the language.
Reading code written by proficient programmers is the most effective way to enhance your knowledge of any programming language, and Pine Script™ is no exception. Luckily, there are numerous reliable sources for high-quality code on TradingView.
To start, you can explore the built-in indicators provided by TradingView. These indicators serve as excellent examples of well-written code. Simply load an indicator on your chart and hover over its name to access the "Source code" icon. Clicking on this icon will open the Pine Script™ Editor, where you can view the indicator's code.
The Pine Script™ Editor allows you to explore and modify the code. If you want to experiment with a specific indicator, you can make a copy of the code by selecting "Make a copy" from the "More" menu. This way, you can freely modify and save your changes without affecting the original indicator.
Another fantastic resource for reading code is the vast collection of Community Scripts on TradingView. These scripts, created by talented traders and programmers like yourself, offer a wealth of inspiration and knowledge. When browsing through Community Scripts, look for scripts without a gray or red "lock" icon, indicating that they are open-source.
Opening a script's page allows you to view its source code. By examining different scripts, you can gain insights into various trading strategies and techniques. This exposure to different coding styles will broaden your understanding of Pine Script™ and help you improve your own coding skills.
Now that we've explored reading code, it's time to unleash our creativity and start writing our own Pine Script™ scripts. Whether you're a beginner or an experienced programmer, Pine Script™ provides a user-friendly yet powerful platform for developing indicators, strategies, and even libraries.
Pine Script™ empowers us to write three types of scripts: indicators, strategies, and libraries. Indicators, like RSI and MACD, help us analyze market data. Strategies, on the other hand, include trading logic and can be backtested and forward-tested. Lastly, libraries enable advanced programmers to create reusable functions for other scripts.
I invite you all to embark on this exciting journey of writing your first indicator. With Pine Script™, we have a language that is both approachable for beginners and flexible enough for advanced traders. Let's unlock our creativity and develop trading tools tailored to our unique strategies.
Thank you for joining me today as we explored the art of reading and writing Pine Script™. Stay tuned for the next episode, where we'll dive deeper into writing indicators and unleash the full potential of this remarkable language. Until then, keep trading with passion and continue honing your coding skills!
Library
Recent Judge statements in Library case create bullish sentimentThe Judge with the assistance of John Deaton via amicus, got the SEC to agree that sales of library credits from the secondary market do not constitute a security and since that news came out lbry has had a big pump here. You can’t see it here on the weekly chart, but on the daily time frame we have also just seen one of the biggest daily volume candles we’ve seen in a long long time on lbry suggesting that there are good odds it will find a way to confirm this double bottom pattern and also likely validated the breakout from this pattern as well y breaking above the channel shown here on the weekly chart. Of course the fed could manipulate things with more rate increases or a black swan could occur that nullifies the newfound bullish momentum but barring those 2 things I would say probability should favor an eventual breakout of this pattern. *not financial advice*
Library Credits could go parabolic!The main thing to look at here is 1st bullish divergence
2nd the ULTIMATE MA MTF has turned green and 3rd the RSI must get over the yellow line and make it support. This is very important as it went parabolic the previous time it did so and the risk of a false breakout is lowered.
Target is .35 to .39 cents
This is a higher risk trade so please don't take this as financial advice
LBC Library still under monthly resistance The monthly stochastic RSI is showing strength and momentum but price is still under the resistance. LBC needs to move above 3 cents and hold it as support on the monthly chart. doing so would make the next move be to the resistance of 7 cents and the same rules apply to this resistance area as the previous.
Momentum growing I would not be surprised to see the price move above the 3 cent mark and make it support.
Library is great media platform that is decentralized and open sourced. By being decentralized the platform protects freedom of speech rights and ensures freedom of press. There also is a mobile app on Android.
There is a court judgement against this project awaiting the final ruling as the SEC has filled a securities claims against LBRY. Regardless of the outcome, this jurisdiction is bound only to USA borders so to the rest of the globe it means nothing.
Thanks for looking
Any questions or comments can be left below.
multitype dynamic multi registry with categories 3d matrix
using matrixes, and overloads.. a complete parallel multiregistry, multitype,multikey datastore.
it can use get, set, delete, with as many registries and individual matrixes as the system can handle.
system >
registry
category names
key names for each item
value (( to x/y in value matrix)
value matrix
item in x/y coords
so putting item 'float XXX' with a value of XXX (ohlc..) for category 'ohlc values' into value matrix floats, floats1 for hist... etc.. historical value for the past X num of bars for all 4 values in historical matrixes..
here's an example..
almost done testing..
very powerful tool
anyone with extensive skills who can take a look at it, i'm open for help prepping and finding any optimizations available
as is, it is very very fast..
i believe i can improve though from here.
_ohlcreg = initkeyregistry(2,2)
_regfloats = ini_float(2,2)
_hist1_floats = ini_float(2,2)
_colorreg = ini_color(2,2)
set(_regfloats , _ohlcreg, 'Normal', 'open ' , open )
set(_regfloats , _ohlcreg, 'Normal', 'high ' , high )
set(_regfloats , _ohlcreg, 'Normal', 'low ' , low )
set(_regfloats , _ohlcreg, 'Normal', 'close ' , close )
set(_regfloats , _ohlcreg, 'MTF' , 'open ' , request.security('MSFT', 'D', open ))
set(_regfloats , _ohlcreg, 'MTF' , 'high ' , request.security('MSFT', 'D', high ))
set(_regfloats , _ohlcreg, 'MTF' , 'low ' , request.security('MSFT', 'D', low ))
set(_regfloats , _ohlcreg, 'MTF' , 'close ' , request.security('MSFT', 'D', close ))
set(_hist1_floats, _ohlcreg, 'Normal', 'open ' , open )
set(_hist1_floats, _ohlcreg, 'Normal', 'high ' , high )
set(_hist1_floats, _ohlcreg, 'Normal', 'low ' , low )
set(_hist1_floats, _ohlcreg, 'Normal', 'close ' , close )
set(_hist1_floats, _ohlcreg, 'MTF' , 'open ' , request.security('MSFT', 'D', open ))
set(_hist1_floats, _ohlcreg, 'MTF' , 'high ' , request.security('MSFT', 'D', high ))
set(_hist1_floats, _ohlcreg, 'MTF' , 'low ' , request.security('MSFT', 'D', low ))
set(_hist1_floats, _ohlcreg, 'MTF' , 'close ' , request.security('MSFT', 'D', close ))
// add colors for these specific ones.. if a value is attempted to retrieve
// but the spot on the value matrix is empty, it will siimple pull a typecast na.
// so these colors show when specidfied.. will have to make a global or a '*' for any'
set(_colorreg , _ohlcreg, 'Normal', 'open ' , color.red )
set(_colorreg , _ohlcreg, 'Normal', 'high ' , color.green )
set(_colorreg , _ohlcreg, 'Normal', 'low ' , color.blue )
set(_colorreg , _ohlcreg, 'Normal', 'close ' , color.orange)
// ... etc..
// the retrieval now can select along any axis...
// which matrix to use
valmatrix = switch input(0)
0 => _regfloats
1 => _hist1_floats
/// which group to pull from
_barchoice = input.string('MTF', options = )
/// which value from that group-.
valuechoice = switch input(1)
1 => 'open '
2 => 'high '
3 => 'low '
4 => 'close '
plot(get(valmatrix, _ohlcreg, _barchoice, valuechoice ))
plot(get(_regfloats , _ohlcreg, 'Normal', 'open '), 'Normal open ' ,
get(_colorreg , _ohlcreg, 'Normal', 'open '))
plot(get(_regfloats , _ohlcreg, 'Normal', 'high '), 'Normal high ' ,
get(_colorreg , _ohlcreg, 'Normal', 'high '))
plot(get(_regfloats , _ohlcreg, 'Normal', 'low '), 'Normal low ' ,
get(_colorreg , _ohlcreg, 'Normal', 'low '))
plot(get(_regfloats , _ohlcreg, 'Normal', 'close '), 'Normal close ' ,
get(_colorreg , _ohlcreg, 'Normal', 'close '))
trading-vue-js is a good library js to build stock, crypto chartI spent time researching the js library to implement a stock chart. Many thanks to C451 implemented the trading-vue-js from Github.
TradingVue.js was a hackable charting lib for traders. You could draw literally ANYTHING on top of candlestick charts.
Features
Scrolling & zooming as we all like
Simple API for making new overlays
Custom drawing tools
Non-time based charts (e.g. Renko)
One overlay === one .vue component
Fully reactive
Fully responsive
Customizable colors and fonts
Quite fast (works even with 3 mil candles)
Scripts (make your own indicators)
If you can code with VUEJS, let's use this one. And another thing, I use IEXCloud to build a stock chart in real-time.
Library credits - A closer lookScythe pattern present along with falling wedges
This coin is undergoing extreme accumulation
Yellow channel optimal by zone if the bullflag / falling wedge reaches there.
This is the four hour chart,
One of my preferred ideas for LBC :D
Library Credits Fib Waves - 1.618Looking for more bullish continuation through 1.618
linking my fib waves idea
cheers
LBC Furthering the moonshot?LBC is an ascending channel
a flag has formed which could be acting as the flagpole for a strange bull flag
LBC has performed incredibly well so far
lets see how much steam she has left
Comparison Pt.2 LBCLibrary credits has formed a huge buy signal, supported by the Gaussian channel. On a smaller timeframe this can be seen as a Descending Scallop a bullish reversal pattern. A similar pattern can be seen in the early days of the release of the coin. Huge potential..
LBC - Bullish Reversal ConfirmationI have been following LBC for a few months. Longing and shorting small positions to get a feel of its behavior. On Monday, when the BTC rally dumped the alt market, I decided to enter long with a bigger position targeting 16k sats as the first goal (reached).
Looking at the price of the token before it dumped one year ago could give you an idea of possible future valuation.
Given the steady uptrend I am now looking for 2x within the next 2 months.
The coin's current market cap and fundamentals imply multiplier potential long term.
LBC goes up Major support line at .00005 currently, I believe it may hit the target of .00015 around mid-late april. Stop loss at .000045 is a good idea.
LBRY has an early access to all the subscribed email list, if you do not know, please check here. lbry.io (my referral link thanks!)
The early access to the application according to plan it is in April. So an uptrend is expected along the way for this and next month. Plus, there's plenty of uncertainty in BTC right now it is a good idea to hedge on LBRY. My opinion, LBRY has a very good concept of working instead of being a cryptocurrency only. It provides a decentralized, censorship-free sharing platform. I do believe in core value of LBRY Credits.
Best regards,
Vern