
Strategi ini adalah sistem perdagangan mengikut arah aliran berdasarkan penunjuk Awan Ichimoku. Strategi ini mengenal pasti arah aliran pasaran melalui persimpangan komponen teras carta awan dan menjana isyarat dagangan apabila harga menembusi tahap teknikal utama. Strategi ini menggunakan kaedah bukan lukisan semula, dan semua isyarat disahkan pada penutupan talian K, yang mengurangkan risiko isyarat palsu dengan berkesan. Strategi ini boleh digunakan untuk beberapa tempoh masa dan amat sesuai untuk persekitaran pasaran dengan turun naik yang tinggi.
Logik teras strategi adalah berdasarkan tiga syarat utama berikut:
Strategi ini mewujudkan sistem dagangan mengikut arah aliran yang boleh dipercayai melalui aplikasi inovatif penunjuk carta awan. Reka bentuk strategi tidak mengecat semula dan mekanisme pengesahan berbilang meningkatkan kualiti isyarat dengan ketara. Walaupun prestasi lemah dalam pasaran yang tidak menentu, kestabilan dan kebolehgunaan strategi boleh dipertingkatkan lagi melalui arahan pengoptimuman yang disyorkan. Strategi ini amat sesuai untuk menjejak arah aliran jangka sederhana hingga panjang dan merupakan pilihan yang baik untuk pedagang yang mencari peluang mengikut arah aliran.
/*backtest
start: 2025-01-09 00:00:00
end: 2025-01-16 00:00:00
period: 10m
basePeriod: 10m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT","balance":49999}]
*/
//@version=5
strategy("Ichimoku Cloud Buy Strategy (Non-Repainting)", overlay=true)
// === Ichimoku Cloud Settings ===
lengthConversionLine = input(9, title="Conversion Line Length")
lengthBaseLine = input(26, title="Baseline Length")
lengthLeadLine = input(52, title="Lead Line Length")
// === Calculate Ichimoku Cloud Components ===
conversionLine = ta.sma((high + low) / 2, lengthConversionLine)
baseLine = ta.sma((high + low) / 2, lengthBaseLine)
leadLineA = (conversionLine + baseLine) / 2
leadLineB = ta.sma((high + low) / 2, lengthLeadLine)
// === Forward Projected Lead Lines (Fixes Ichimoku Calculation) ===
leadLineA_Future = leadLineA[lengthBaseLine] // Shift forward
leadLineB_Future = leadLineB[lengthBaseLine]
// === Define Buy and Sell Conditions (Confirmed at Bar Close) ===
buyCondition = ta.crossover(close, baseLine) and ta.crossover(close, leadLineA) and close > conversionLine and bar_index > bar_index[1]
sellCondition = ta.crossunder(close, baseLine) and ta.crossunder(close, leadLineA) and close < conversionLine and bar_index > bar_index[1]
// === Plot Buy and Sell Signals (Confirmed at Bar Close) ===
plotshape(buyCondition, style=shape.triangleup, location=location.belowbar, color=color.green, size=size.small, title="Buy Signal")
plotshape(sellCondition, style=shape.triangledown, location=location.abovebar, color=color.red, size=size.small, title="Sell Signal")
// === Implement Strategy Logic (Trades at Bar Close) ===
if (buyCondition)
strategy.entry("Buy", strategy.long)
if (sellCondition)
strategy.close("Buy")
// === Plot Ichimoku Cloud Components with Future Projection ===
pConversionLine = plot(conversionLine, color=color.blue, title="Conversion Line")
pBaseLine = plot(baseLine, color=color.red, title="Base Line")
pLeadLineA = plot(leadLineA_Future, color=color.green, title="Lead Line A", offset=lengthBaseLine)
pLeadLineB = plot(leadLineB_Future, color=color.orange, title="Lead Line B", offset=lengthBaseLine)
// === Fill Ichimoku Cloud for Better Visualization ===
fill(pLeadLineA, pLeadLineB, color=leadLineA > leadLineB ? color.green : color.red, transp=80)
// === Alert Conditions (Only Triggered on Confirmed Signals) ===
alertcondition(buyCondition, title="Ichimoku Cloud Buy Signal", message="Ichimoku Cloud Buy Signal Triggered")
alertcondition(sellCondition, title="Ichimoku Cloud Sell Signal", message="Ichimoku Cloud Sell Signal Triggered")