Charting Functions in PineScript
Authored by
Invos Research
Date Released
Few more examples of predefined functions in Pine Script that can be used for various purposes:
Charting Functions:
plot(data, style=plot.style_line, title="", color=color.black, linewidth=1): plots thedataon the chart with specifiedstyle,title,color, andlinewidth.hline(level, title="", color=color.black, linewidth=1): plots a horizontal line at the specifiedlevelwith a specifiedtitle,color, andlinewidth.vline(bar_index, title="", color=color.black, linewidth=1): plots a vertical line at the specifiedbar_indexwith a specifiedtitle,color, andlinewidth.fill(data1, data2, color=color.black, transp=80): fills the area betweendata1anddata2with a specifiedcolorandtransparency.label(text, x=bar_index, y=close, color=color.black, style=label.style_none): adds a label with specifiedtext,xandyposition,color, andstyleto the chart.shapes(shape_type, x1, y1, x2, y2, color=color.black, transp=80, text=""): plots a shape of specifiedshape_typewith the specifiedx1,y1,x2,y2coordinates,color,transparencyandtexton the chart.
Other useful functions
strategy.position_size: returns the current position size of the strategystrategy.risk: returns the current risk of the strategystrategy.equity: returns the current equity of the strategystrategy.profit: returns the current profit of the strategystrategy.order: returns the current order of the strategy
These are just a few examples of the many predefined functions available in Pine Script. Pine Script is a powerful and versatile language, and it is continually being updated with new features and functions by the community. It's always a good idea to check the Pine Script documentation for the latest list of available functions and their usage.

