The Fisher Transform Dynamic Threshold Trend Following Strategy utilizes the Fisher Transform indicator to identify changes in price trends. The strategy uses the Fisher Transform to normalize prices to a standard scale, making it easier to detect potential trend reversal points. By dynamically adjusting thresholds, the strategy adapts to different market conditions and improves the accuracy of trend recognition. When the Fisher Transform value crosses positive or negative thresholds, the strategy generates buy or sell signals to follow market trends.
The Fisher Transform Dynamic Threshold Trend Following Strategy identifies changes in price trends using the Fisher Transform indicator and dynamic thresholds, adapting to different market states. The strategy effectively captures market trends and enables trend-following trading. Its advantages include dynamic threshold adjustment, reduced price noise interference, and intuitive chart display. However, it also faces challenges such as parameter optimization risk, trend recognition lag, poor performance in choppy markets, and extreme market risk. Through measures like parameter optimization, signal filtering, stop-loss and take-profit, and position management, the strategy’s robustness and profitability can be further enhanced.
/*backtest start: 2024-05-01 00:00:00 end: 2024-05-31 23:59:59 period: 1h basePeriod: 15m exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}] */ //@version=5 strategy("Qiuboneminer - Fisher Transform", overlay=true) // Parámetros Len = input.int(10, minval=1) mult1 = input.int(1, minval=1) threshold = 2.6 // Función Fisher Transform fish(Length, timeMultiplier) => var float nValue1 = na var float nFish = na xHL2 = hl2 xMaxH = ta.highest(xHL2, Length * timeMultiplier) xMinL = ta.lowest(xHL2, Length * timeMultiplier) nValue1 := 0.33 * 2 * ((xHL2 - xMinL) / (xMaxH - xMinL) - 0.5) + 0.67 * nz(nValue1[1]) nValue2 = if nValue1 > 0.99 0.999 else if nValue1 < -0.99 -0.999 else nValue1 nFish := 0.5 * math.log((1 + nValue2) / (1 - nValue2)) + 0.5 * nz(nFish[1]) nFish // Cálculo del Fisher Transform para mult1 Fisher1 = fish(Len, mult1) // Condiciones de entrada y salida longCondition = Fisher1 > nz(Fisher1[1]) and nz(Fisher1[1]) <= nz(Fisher1[2]) and Fisher1 < -threshold shortCondition = Fisher1 < nz(Fisher1[1]) and nz(Fisher1[1]) >= nz(Fisher1[2]) and Fisher1 > threshold // Estrategia de entrada if (longCondition) strategy.entry("Long", strategy.long) if (shortCondition) strategy.entry("Short", strategy.short) // Ploteo del Fisher Transform plot(Fisher1, color=(Fisher1 > nz(Fisher1[1]) ? color.rgb(34, 255, 0) : color.rgb(255, 0, 212)), title="Fisher TF:1") // Ploteo de líneas de umbral hline(threshold, "Umbral Superior", color=color.rgb(255, 0, 0), linestyle=hline.style_dotted) hline(-threshold, "Umbral Inferior", color=#008704, linestyle=hline.style_dotted)template: strategy.tpl:40:21: executing "strategy.tpl" at <.api.GetStrategyListByName>: wrong number of args for GetStrategyListByName: want 7 got 6