ورود

ثبت نام

خانه >

تحلیل ها >

Aaaap

Aaaap

saw7152

analysis_chart
مشخصات معامله

قیمت در زمان انتشار:

۶۸,۲۲۵.۴۹

توضیحات
//@version=5
strategy("Ichimoku Adaptive TP + Trailing Risk-Free", overlay=true, margin_long=100, margin_short=100, initial_capital=10000, default_qty_type=strategy.percent_of_equity, default_qty_value=10)

// --------------------- Inputs ---------------------
tenkanLength = input.int(9, "Tenkan Length")
kijunLength = input.int(26, "Kijun Length")
senkouBLength = input.int(52, "Senkou Span B Length")
atrLength = input.int(14, "ATR Length")
atrMultiplierMax = input.float(5, "Max TP multiplier")
atrMultiplierMin = input.float(2, "Min TP multiplier")
partialRiskFreeLevel = input.float(0.5, "Partial Risk-Free Level")
trailingLevel = input.float(0.9, "Trailing Stop Level")

// --------------------- Ichimoku ---------------------
tenkan = ta.sma(ta.highest(high, tenkanLength) + ta.lowest(low, tenkanLength), 2)
kijun = ta.sma(ta.highest(high, kijunLength) + ta.lowest(low, kijunLength), 2)
senkouA = ta.sma(tenkan + kijun, 2)
senkouB = ta.sma(ta.highest(high, senkouBLength) + ta.lowest(low, senkouBLength), 2)
atrVal = ta.atr(atrLength)

// --------------------- Trend Filter ---------------------
distanceFromKumo = close >> senkouA ? close - math.max(senkouA, senkouB) : math.min(senkouA, senkouB) - close
kijunSlope = kijun - kijun
trendFilter = distanceFromKumo >= 0.0005 and math.abs(kijunSlope) >= 0.00005 and atrVal >= 0.0003

// --------------------- Entry Conditions ---------------------
longCondition = ta.crossover(tenkan, kijun) and close > math.max(senkouA, senkouB) and trendFilter
shortCondition = ta.crossunder(tenkan, kijun) and close < math.min(senkouA, senkouB) and trendFilter

// --------------------- SL & TP Adaptive ---------------------
longSL = ta.lowest(low, kijunLength)
shortSL = ta.highest(high, kijunLength)

atrRatio = atrVal / ta.sma(ta.atr(atrLength), 50) * 2
longTP = close + math.max(close - longSL, math.min(atrRatio, atrMultiplierMax) * (close - longSL))
shortTP = close - math.max(shortSL - close, math.min(atrRatio, atrMultiplierMax) * (shortSL - close))

// --------------------- Position Management ---------------------
var float longEntryPrice = na
var float shortEntryPrice = na
var bool longRiskFree = false
var bool shortRiskFree = false

// Entry
if longCondition
strategy.entry("Long", strategy.long)
longEntryPrice := close
longRiskFree := false

if shortCondition
strategy.entry("Short", strategy.short)
shortEntryPrice := close
shortRiskFree := false

// Exit Management with Partial Risk-Free & Trailing
if strategy.position_size > 0
// Partial Risk-Free
if not longRiskFree and close >= longEntryPrice + (longTP-longEntryPrice)*partialRiskFreeLevel
strategy.exit("Long RiskFree", "Long", stop=longEntryPrice)
longRiskFree := true
// Trailing Stop near TP
if close >= longEntryPrice + (longTP-longEntryPrice)*trailingLevel
newStop = close - 0.1*(longTP-longEntryPrice)
strategy.exit("Long Trailing", "Long", stop=newStop, limit=longTP)

if strategy.position_size < 0
// Partial Risk-Free
if not shortRiskFree and close <= shortEntryPrice - (shortEntryPrice-shortTP)*partialRiskFreeLevel
strategy.exit("Short RiskFree", "Short", stop=shortEntryPrice)
shortRiskFree := true
// Trailing Stop near TP
if close <= shortEntryPrice - (shortEntryPrice-shortTP)*trailingLevel
newStop = close + 0.1*(shortEntryPrice-shortTP)
strategy.exit("Short Trailing", "Short", stop=newStop, limit=shortTP)

// --------------------- Plot ---------------------
plot(tenkan, color=color.blue, title="Tenkan")
plot(kijun, color=color.red, title="Kijun")
plot(senkouA, color=color.green, title="SenkouA")
plot(senkouB, color=color.orange, title="SenkouB")

آخرین تحلیل‌های undefined

خلاصه تحلیل ها
مشاهده بیشتر
Bitcoin در 60 روز چقدر می‌تواند رشد کند؟ $118K یا $74K؟ (Comment!)
صعودی

Bitcoin در 60 روز چقدر می‌تواند رشد کند؟ $118K یا $74K؟ (Comment!)

۹۸٪ از کف تا سقف به معنای قیمت $118,800 است. آیا این غیرمنطقی به نظر می‌رسد؟ آیا این واقعیت که ما تا پایان فوریه، مارس و بخش زیادی از آوریل فرصت داریم...

MasterAnanda-image

MasterAnanda

حدود 1 ساعت قبل

منتخب سردبیر

مشاهده بیشتر

دستیار هوشمند ارز دیجیتال

ترمینال ترید بایتیکل نرم‌افزار جامع ترید و سرمایه‌گذاری در بازار ارز دیجیتال است و امکاناتی مانند دوره‌های آموزشی ترید و سرمایه‌گذاری، تریدینگ ویو بدون محدودیت، هوش مصنوعی استراتژی ساز ترید، کلیه داده‌‌های بازارهای مالی شامل داده‌های اقتصاد کلان، تحلیل احساسات بازار، تکنیکال و آنچین، اتصال و مدیریت حساب صرافی‌ها و تحلیل‌های لحظه‌ای را برای کاربران فراهم می‌کند.

دستیار هوشمند ارز دیجیتال
دستیار هوشمند ارز دیجیتال