Library "ObjectStack" init() push() push() push() push() push() nextIndex() nextIndex() nextIndex() nextIndex() nextIndex() delete() delete() delete() delete() delete() cleanOldest() cleanOldest() cleanOldest() cleanOldest() cleanOldest()
Library "CRCHud" Library of functions which will contain functions that allow reusable HUD (Heads up Display) components to used from within other scripts add_cell_change() - Adds a new cell to designated table which displays the data source value, the line color, data title, and automatically calculated %percent change stats based on lookback value...
Library "UnicodeReplacementFunction" Unicode Characters Replacement function for strings. replaceFont(_str, _fontType) Unicode Character Replace Function Parameters: _str : String input _fontType : Font Type Selector Returns: Replaced Char String with any custom font type choosed
Library "LabelHelper" Utility for managing active labels on the chart. add(level, txt, labelColor, textColor) For displaying a lable at the last bar. Parameters: level : The value to display the label at. txt : The text to show on the label. labelColor : The color of the label. textColor : The text color of the label. Returns: The...
Library "DrawIndicatorOnTheChart" this library is used to show an indicator (such RSI, CCI, MOM etc) on the main chart with indicator's horizontal lines in a window. Location of the window is calculated dynamically by last price movemements drawIndicator(indicatorName, indicator, indicatorcolor, period, indimax_, indimin_, levels, precision, xlocation) draws...
Library "amibroker" This library consists of functions from amibroker that doesn't exist on tradingview pinescript. The example of these are the ExRem and Flip. In the example below, I used ExRem to remove the excessive buy and sell signals. Meanwhile, I used the Flip to highlight the bg color when there is an open position. exrem(series1, series2) Removes...
Library "Labels" Functions to create labels, from simple to complex. labelSimple() Creates a label each time a condition is true. All label parameters can be customised. _condition The condition which must evaluate true for the label to be printed. _x The x location. _y The y location. _text The text to print on the label. _color The...
Library "Bursa_Sector" : List of stocks classified by sector in Bursa Malaysia (As of Oct 2021) getSector() This function will get the sector of current stock that listed in Bursa Malaysia
Library "CreateAndShowZigzag" Functions in this library creates/updates zigzag array and shows the zigzag getZigzag(zigzag, prd, max_array_size) calculates zigzag using period Parameters: zigzag : is the float array for the zigzag (should be defined like "var zigzag = array.new_float(0)"). each zigzag points contains 2 element: 1. price level of the zz...
Library "LineGetPriceOnLogScale" This library provides a way to calculate the y-coordinate of a line on a specified bar when the chart scale is Log. The built-in `line.get_price()` function only works with linear scale and gives incorrect results when the chart is in Log scale. The library only works with `bar_index` values and `xloc.bar_index`-based lines,...
Library "SignificantFigures" sigFig(float _float, int _figures) @description Takes a floating-point number - one that can, but doesn't have to, include a decimal point - and converts it to a floating-point number with only a certain number of digits left. For example, say you want to display a variable from your script to the user and it comes out to...
Library "FunctionDatestring" Methods to stringify date/time, altho there is already builtin support for it. datetime(unixtime) a stringified date stamp at specified unix time. Parameters: unixtime : int unix timestamp. Returns: string date_(unixtime) a stringified date stamp at specified unix time. Parameters: unixtime : int unix timestamp....
So i had this idea while ago when @alexgrover published a script and dropped a nugget in between which replicates the result of strategy tester on chart as an indicator. So it seemed fair to use one of his strategy to display the results. This strategy tester can now be used in replay mode like an indicator and you can see what happen at a particular section...
A label function for display an arbitrary value above or below the chart. There is no convenient way to display the value of a variable in pinescript. This is most convenient way I found. It will follow the current bar (the position is calculated with highest/lowest and atr value, as such it will never display over the chart) In this script we display ATR for...
This script will give you red/green columns to indicate if price is above or below a certain EMA. With Candlestick charting, we are looking for price in relation to the 8 ema Trigger Line (T-Line). You can adjust this indicator to fit your need. Simple, but nice to quickly see. Oops. Last line's title should be "Sell". Doesn't affect display though.