Available translations

Percentages

foundations.png
Summary: The Percentages indicator produces information for the current candle when compared to the close price, and the average of high/low/close of candles 1, 5 and 10 periods previous to the current one.
Percentages on the Charts:
The Percentages indicator does not show any plotted information. All data produced from this indicator can be seen in the panel in the charting space.
The information in the panel shows the percentage increase or decrease for the following:
  • p1Close: the percentage increase/decrease of the current candle close when compared to the candle close 1 period previous.
  • p5Close: the percentage increase/decrease of the current candle close when compared to the candle close 5 periods previous.
  • p10Close: the percentage increase/decrease of the current candle close when compared to the candle close 10 periods previous.
  • phlc1: the percentage increase/decrease of the current candle average (high + low + close)/3 when compared to the candle average 1 period previous.
  • phlc5: the percentage increase/decrease of the current candle average (high + low + close)/3 when compared to the candle average 5 periods previous.
  • phlc10: the percentage increase/decrease of the current candle average (high + low + close)/3 when compared to the candle average 10 periods previous.
The period length parameter of the Percentages indicator calculation can be changed by locating and opening the Javascript Code under Data Building Procedure -> Procedure Initialization under ’Percentages’ Product Definition.
Products & Properties
The following properties are available to access:
Product Name Product Variable Properties
Percentages Percentages p1Close, p5Close, p10Close, phlc1, phlc5, phlc10
Examples:
The Percentage calculation could be used to set a take profit or stop loss limit based on the desired percentage change.
The following example would set a take profit signal if the current candle close price rose above 3% from the close price 5 candles ago:
 if(chart.at01hs.Percentages.p5Close > 3){
    let tp=chart.at01hs.candle.close
    }
 tp \\returns take profit variable
This indicator could also be used to provide a trailing stop loss when in a trade by checking if the candle close is still above the midPoint value.
Maintainer:
Previous
Donchian-Tenkan
Next
DCA Levels Long