KST con HMA---------- ENGLISH DESCRIPTION ----------
The indicator created is called "KST with HMA" and is used to measure the impulse of an asset's price.
The code begins by defining four variables representing ROC (Rate of Change) period lengths for calculating the KST (Know Sure Thing) and a variable for the length of the HMA (Hull Moving Average).
Next, an HMA function is defined to calculate the Hull Moving Average, a type of weighted moving average that adjusts for price volatility.
ROC values are then calculated for the four periods defined above and KST values are calculated as a weighted sum of the ROC values. These values are then normalized with the HMA and the standard deviation of the HMA is calculated. The normalized value is finally plotted with three different color lines: black for values greater than 1, red for values less than -1, and green for values between -1 and 1.
Finally, a black dashed line is plotted to represent the zero line. The green line indicates a phase of market uncertainty or lateralization, while the indicator can be used to identify buy points above zero and sell points below zero.
---------- ITALIAN DESCRIPTION ----------
L'indicatore creato è chiamato "KST con HMA" e viene utilizzato per misurare l'impulso del prezzo di un asset.
Il codice inizia definendo quattro variabili che rappresentano le lunghezze dei periodi di ROC (Rate of Change) per il calcolo del KST (Know Sure Thing) e una variabile per la lunghezza dell'HMA (Hull Moving Average).
Successivamente viene definita una funzione HMA per il calcolo della Hull Moving Average, un tipo di media mobile ponderata che si adatta alla volatilità del prezzo.
Vengono poi calcolati i valori ROC per i quattro periodi definiti in precedenza e calcolati i valori KST come somma ponderata dei valori ROC. Questi valori vengono poi normalizzati con l'HMA e viene calcolata la deviazione standard dell'HMA. Il valore normalizzato viene infine plottato con tre diverse linee di colore: nero per valori superiori a 1, rosso per valori inferiori a -1 e verde per valori tra -1 e 1.
Infine, viene plottata una linea tratteggiata nera per rappresentare la linea zero. La linea verde indica una fase di incertezza o lateralizzazione del mercato, mentre l'indicatore può essere utilizzato per individuare punti di acquisto sopra lo zero e di vendita al di sotto dello zero.
Centeredoscill
Karobein OscillatorDeveloped by Emily Karobein, the Karobein oscillator is an oscillator that aim to rescale smoothed values with more reactivity in a range of (0,1)
Calculation
The scaling method is similar to the one used in a kalman filter for the kalman gain.
We first average the up/downs x, those calculations are similar to the ones used for calculating the average gain/loss in the relative strength index.
a = ema(src < src ? x : 0,length)
b = ema(src > src ? x : 0,length)
where src is a exponential moving average of length period and x is src/src in the standard calculations, but anything else can be used as long as x > 0 .
Then we rescale the results.
c = x/(x + b)
d = 2*(x/(x + c*a)) - 1
How To Use
It is better to use centerline-cross/breakouts/signal line.
In general when we use something smooth as input in oscillators, breakouts are better than reversals, you can see this with the stochastic and rsi.
So a simple approach could be buying when crossing over 0.8 and selling when crossing under 0.2.
Here is the balance of a strategy using those conditions, length = 50 .
20 trades have been mades since the 29 oct we made 341 pips with eur/usd, of course this backtest was made during good trends period,
this result is not representative of how the strategy work with other conditions/markets.
For any questions/suggestions feel free to contact me