INVITE-ONLY SCRIPT

80% win rate_ONE postion_DEMO

//version=5
indicator('AAtrading', shorttitle='AAtrading', overlay=true)

// الإعدادات الثابتة (ATR Period = 10, Multiplier = 3)
length = 10 // فترة ATR ثابتة
mult = 3.0 // معامل ATR ثابت
useClose = input.bool(title='Use Close Price for Extremums', defval=true)

showLabels = input.bool(title='Show Buy/Sell Labels', defval=true)
highlightState = input.bool(title='Highlight State', defval=true)

// إعدادات السيولة
outlierThreshold = input.int(title='Outlier Threshold Length', defval=10)
fastMovingAverageLength = 100 // فترة MA السريع ثابتة
slowMovingAverageLength = 200 // فترة MA البطيء ثابتة

// خيارات الألوان
buyColor = input.color(title='Buy Signal Color', defval=color.green)
sellColor = input.color(title='Sell Signal Color', defval=color.red)

// حساب الـ ATR
atr = mult * ta.atr(length)

// حساب نقاط التوقف للمراكز الطويلة والقصيرة
longStop = (useClose ? ta.highest(close, length) : ta.highest(length)) - atr
longStopPrev = nz(longStop[1], longStop)
longStop := close[1] > longStopPrev ? math.max(longStop, longStopPrev) : longStop

shortStop = (useClose ? ta.lowest(close, length) : ta.lowest(length)) + atr
shortStopPrev = nz(shortStop[1], shortStop)
shortStop := close[1] < shortStopPrev ? math.min(shortStop, shortStopPrev) : shortStop

// تحديد الاتجاه (1=شراء, -1=بيع)
var int dir = 1
dir := close > shortStopPrev ? 1 : close < longStopPrev ? -1 : dir

// حساب السيولة (Liquidity) بناءً على الحركة السعرية
priceMovementLiquidity = volume / math.abs(close - open)

// حساب الحدود لتحديد السيولة المتطرفة
liquidityBoundary = ta.ema(priceMovementLiquidity, outlierThreshold) + ta.stdev(priceMovementLiquidity, outlierThreshold)

// إنشاء مصفوفة لتخزين قيم السيولة
var liquidityValues = array.new_float(5)

// التحقق إذا كانت السيولة تتجاوز الحدود
if ta.crossover(priceMovementLiquidity, liquidityBoundary)
array.insert(liquidityValues, 0, close)

// حساب المتوسطات المتحركة (EMAs) على آخر قيمة سيولة
fastEMA = ta.ema(array.get(liquidityValues, 0), fastMovingAverageLength)
slowEMA = ta.ema(array.get(liquidityValues, 0), slowMovingAverageLength)

// رسم المتوسطات المتحركة (EMAs) بناءً على السيولة
fastPlot = plot(fastEMA, color = fastEMA > slowEMA ? color.new(buyColor, 50) : color.new(sellColor, 50))
slowPlot = plot(slowEMA, color = fastEMA > slowEMA ? color.new(buyColor, 50) : color.new(sellColor, 50))

// إنشاء تظليل بين EMAs
fill(fastPlot, slowPlot, fastEMA, slowEMA, fastEMA > slowEMA ? color.new(buyColor, 50) : color.new(sellColor, 50), color.new(chart.bg_color, 80))

// إشارات الشراء والبيع بناءً على المتوسطات والسيولة
buySignal = dir == 1 and dir[1] == -1 and fastEMA > slowEMA
sellSignal = dir == -1 and dir[1] == 1 and fastEMA < slowEMA

// رسم إشارات الشراء والبيع
plotshape(buySignal and showLabels ? longStop : na, title='Buy Label', text='Buy', location=location.absolute, style=shape.labelup, size=size.tiny, color=color.new(buyColor, 0), textcolor=color.white)
plotshape(sellSignal and showLabels ? shortStop : na, title='Sell Label', text='Sell', location=location.absolute, style=shape.labeldown, size=size.tiny, color=color.new(sellColor, 0), textcolor=color.white)

// إشعارات التنبيه (Alerts)
alertcondition(buySignal, title='Buy Alert', message='🚨 Buy Signal from Chandelier Exit + LWMAs!')
alertcondition(sellSignal, title='Sell Alert', message='🚨 Sell Signal from Chandelier Exit + LWMAs!')
Bands and ChannelsChart patterns

Invite-only script

Access to this script is restricted to users authorized by the author and usually requires payment. You can add it to your favorites, but you will only be able to use it after requesting permission and obtaining it from its author. Contact scv6205 for more information, or follow the author's instructions below.

TradingView does not suggest paying for a script and using it unless you 100% trust its author and understand how the script works. In many cases, you can find a good open-source alternative for free in our Community Scripts.

Author's instructions

원포지션 매매

Want to use this script on a chart?

Warning: please read before requesting access.

Disclaimer