Unicode Characters Replacement function for strings.
replaceFont(_str, _fontType) Unicode Character Replace Function
_str : String input
_fontType : Font Type Selector
Returns: Replaced Char String with any custom font type choosed
Utility for managing active labels on the chart.
add(level, txt, labelColor, textColor) For displaying a lable at the last bar.
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.
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...
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...
Functions to create labels, from simple to complex.
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.
Functions in this library creates/updates zigzag array and shows the zigzag
getZigzag(zigzag, prd, max_array_size) calculates zigzag using period
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...
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,...
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...
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.
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...
Methods to stringify date/time, altho there is already builtin support for it.
datetime(unixtime) a stringified date stamp at specified unix time.
unixtime : int unix timestamp.
date_(unixtime) a stringified date stamp at specified unix time.
unixtime : int unix timestamp....