Returns the offset of the candlestick with the highest value. (more…)
Returns the offset of the candlestick with the highest value. (more…)
Return value of the realized historic volatility over N periods of selected price.
Syntax:
1 |
HistoricVolatility[N](price) |
Calculation:
To calculate this indicator, we must choose the period (the last 20 days for example). Then we calculate the variation of every day during this period. Then we calculate the napierian logarithm and the variation on this data.By extrapolation, we obtain the historic volatilily in %.
Interpretation:
When volatility is important, a trend reversal could be taking place.
Example:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
i1 = HistoricVolatility[10](close) i2 = average[100](i1) i3 = average[10](close) if(i1>i2 AND Close<i3) THEN bearish = -1 bullish = 0 ELSIF (i1>i2 AND Close>i3) THEN bearish = 0 bullish = 1 ELSE bearish = 0 bullish = 0 ENDIF RETURN bearish,bullish |
Represents the hour of each N bar loaded in the chart.
Syntax:
1 |
Hour[N] |
Example:
1 2 3 4 5 6 7 |
IF (Hour[1] = 9) THEN lasthourwasnine = 1 ELSE lasthourwasnine = 0 ENDIF RETURN lasthourwasnine |
Returns the Hull Moving Average value.
Syntax:
1 |
HullAverage[period](price) |
Where:
Instruction used for building conditionnal statement.
Syntax:
1 |
IF |
Example:
1 2 3 4 5 6 7 8 9 |
a = 10 b = 20 //conditionnal statement for building "c" variable IF (a < b) THEN c = a + b ENDIF RETURN c |
On an indicator, this function returns 1 on candlesticks updated in real-time (or the last candlestick on a closed instrument), otherwise it returns 0.
On a backtest, this function returns 1 starting at the date the backtest was started. It is equal to 0 on the historical data preloaded by the backtest (PreLoadBars).
Returns 1 if the index of the array has already been set in the code, otherwise returns 0.
Syntax:
1 |
ISSET($MyArray[Index]) |
where $MyArray is the variable array name and “Index” the index number to check.
Returns the Keltner Band center line value.
Syntax:
1 |
KeltnerBandCenter[period] |
Where:
Returns the Keltner Band lower line value.
Syntax:
1 |
KeltnerBandDown[period] |
Where: