السلام عليكم اخوتي الكرام
انا لدي مؤشر عملته من قبل ايام يعتمد على تقاطع vi - و +vi وتطلع الاشارات بعد التقاطع لكن اريد ان اضيف شرط ان يطلع فقط على الشمعات الاندفاعية سواء بيعية او شرائية هل من ممكن تعديله لي؟
Printable View
السلام عليكم اخوتي الكرام
انا لدي مؤشر عملته من قبل ايام يعتمد على تقاطع vi - و +vi وتطلع الاشارات بعد التقاطع لكن اريد ان اضيف شرط ان يطلع فقط على الشمعات الاندفاعية سواء بيعية او شرائية هل من ممكن تعديله لي؟
//@version=5
indicator("AX globals with Impulse Candles", overlay=true)
// Input settings
actionBoxLength = input.int(3, title="Action Box Length (Bars)")
buyBoxColor = input.color(color.new(color.green, 30), title="Buy Signal Box Color")
sellBoxColor = input.color(color.new(color.red, 30), title="Sell Signal Box Color")
showActionBoxes = input.bool(true, title="Show Action Signal Boxes")
wickRatio = input.float(1.0, title="Wick Ratio (e.g., 3 for 300%)")
bodyToRangeRatio = input.float(0.5, title="Candle Body-to-Range Ratio")
// Candle Properties
candleBody = math.abs(close - open)
candleRange = high - low
upperWick = high - math.max(open, close)
lowerWick = math.min(open, close) - low
// Impulse Candle Conditions
isBullishImpulse = (close > open) and (candleBody / candleRange > bodyToRangeRatio) and (upperWick < (candleBody * wickRatio)) and (lowerWick < (candleBody * wickRatio))
isBearishImpulse = (close < open) and (candleBody / candleRange > bodyToRangeRatio) and (upperWick < (candleBody * wickRatio)) and (lowerWick < (candleBody * wickRatio))
// Vortex Indicator
length = input.int(14, title="Vortex Length")
vi_pos = ta.cum(math.abs(high - low[1])) - ta.cum(math.abs(high - low[1])[length])
vi_neg = ta.cum(math.abs(low - high[1])) - ta.cum(math.abs(low - high[1])[length])
tr = ta.cum(ta.atr(1)) - ta.cum(ta.atr(1)[length])
vi_pos_indicator = vi_pos / tr
vi_neg_indicator = vi_neg / tr
// Crossover Signals
crossoverSignal = ta.crossover(vi_pos_indicator, vi_neg_indicator)
crossunderSignal = ta.crossunder(vi_pos_indicator, vi_neg_indicator)
// SMA Buy/Sell Signal Settings
smaLength = input.int(50, title="SMA Length")
smaSource = input.source(close, title="SMA Source")
smaLine = ta.sma(smaSource, smaLength)
buySMA = ta.crossover(close, smaLine)
sellSMA = ta.crossunder(close, smaLine)
// Impulse Candle + SMA-Vortex Confirmation
buySignal = crossoverSignal and isBullishImpulse
sellSignal = crossunderSignal and isBearishImpulse
// Plot Buy/Sell Signals
plotshape(series=buySignal, title="Buy Signal", color=color.green, style=shape.labelup, location=location.belowbar, text="BUY")
plotshape(series=sellSignal, title="Sell Signal", color=color.red, style=shape.labeldown, location=location.abovebar, text="SELL")
// Alerts
alertcondition(buySignal, title="Buy Alert", message="Buy signal detected on Impulse Candle with SMA-Vortex confirmation.")
alertcondition(sellSignal, title="Sell Alert", message="Sell signal detected on Impulse Candle with SMA-Vortex confirmation.")
شكرا لك اخي العزيز لكن انا عندي مؤشر الاصلي vortex علاماته ليست مثل هذه اشارت البيع او الشراء هذا صورة توضحالملف المرفق 564574
هل يوجد احد يحل لي مشكلة؟
طلبك كان اضافه و تم اضافة impulsive candle
اخي هو يعتمد على pushing candels مع شمعات الاستمرارية على تقاطعات moving و vi- vi+
هذا السكربت الذي انا عدلت عليه ارجو ان ترد علي واسف اذا ازعجتك
//@version=5
indicator("AX globals with Impulse Candles", overlay=true)
// Input settings
actionBoxLength = input.int(3, title="Action Box Length (Bars)")
buyBoxColor = input.color(color.new(color.green, 30), title="Buy Signal Box Color")
sellBoxColor = input.color(color.new(color.red, 30), title="Sell Signal Box Color")
showActionBoxes = input.bool(true, title="Show Action Signal Boxes")
wickRatio = input.float(1.0, title="Wick Ratio (e.g., 3 for 300%)")
bodyToRangeRatio = input.float(0.5, title="Candle Body-to-Range Ratio")
// Candle Properties
candleBody = math.abs(close - open)
candleRange = high - low
upperWick = high - math.max(open, close)
lowerWick = math.min(open, close) - low
// Impulse Candle Conditions
isBullishImpulse = (close > open) and (candleBody / candleRange > bodyToRangeRatio) and (upperWick < (candleBody * wickRatio)) and (lowerWick < (candleBody * wickRatio))
isBearishImpulse = (close < open) and (candleBody / candleRange > bodyToRangeRatio) and (upperWick < (candleBody * wickRatio)) and (lowerWick < (candleBody * wickRatio))
// Vortex Indicator
length = input.int(6, title="Vortex Length")
vi_pos = ta.cum(math.abs(high - low[1])) - ta.cum(math.abs(high - low[1])[length])
vi_neg = ta.cum(math.abs(low - high[1])) - ta.cum(math.abs(low - high[1])[length])
tr = ta.cum(ta.atr(1)) - ta.cum(ta.atr(1)[length])
vi_pos_indicator = vi_pos / tr
vi_neg_indicator = vi_neg / tr
// Crossover Signals
vi_crossover = ta.crossover(vi_pos_indicator, vi_neg_indicator)
vi_crossunder = ta.crossunder(vi_pos_indicator, vi_neg_indicator)
// Moving Direction EMA Indicators
emaLength1 = 8
emaLength2 = 14
emaSource = hlcc4
movingDirection1 = ta.ema(emaSource, emaLength1)
movingDirection2 = ta.ema(emaSource, emaLength2)
// Moving Direction Cross Signals
md_crossover = ta.crossover(movingDirection1, movingDirection2)
md_crossunder = ta.crossunder(movingDirection1, movingDirection2)
// Combined Buy/Sell Conditions
buySignal = isBullishImpulse and (vi_crossover or md_crossover)
sellSignal = isBearishImpulse and (vi_crossunder or md_crossunder)
// Plot Buy/Sell Signals
plotshape(series=buySignal, title="Buy Signal", location=location.belowbar, color=color.green, style=shape.labelup, text="BUY")
plotshape(series=sellSignal, title="Sell Signal", location=location.abovebar, color=color.red, style=shape.labeldown, text="SELL")
// Alerts
alertcondition(buySignal, title="Buy Alert", message="Buy signal detected on Impulse Candle with Vortex & EMA confirmation.")
alertcondition(sellSignal, title="Sell Alert", message="Sell signal detected on Impulse Candle with Vortex & EMA confirmation.")
// Plot EMA Lines
plot(movingDirection1, title="Moving Direction 1 (EMA 8, hlcc4)", color=color.orange, linewidth=1, style=plot.style_line)
plot(movingDirection2, title="Moving Direction 2 (EMA 14, hlcc4)", color=color.purple, linewidth=1, style=plot.style_line)
ممكن الرد
السلام عليكم
هل هذا المطلوب ؟؟
//@version=5
indicator("AX globals with Impulse Candles", overlay=true)
// Input settings
actionBoxLength = input.int(3, title="Action Box Length (Bars)")
buyBoxColor = input.color(color.new(color.green, 30), title="Buy Signal Box Color")
sellBoxColor = input.color(color.new(color.red, 30), title="Sell Signal Box Color")
showActionBoxes = input.bool(true, title="Show Action Signal Boxes")
wickRatio = input.float(1.0, title="Wick Ratio (e.g., 3 for 300%)")
bodyToRangeRatio = input.float(0.5, title="Candle Body-to-Range Ratio")
// Candle Properties
candleBody = math.abs(close - open)
candleRange = high - low
upperWick = high - math.max(open, close)
lowerWick = math.min(open, close) - low
// Impulse Candle Conditions
isBullishImpulse = (close > open) and (candleBody / candleRange > bodyToRangeRatio) and (upperWick < (candleBody * wickRatio)) and (lowerWick < (candleBody * wickRatio))
isBearishImpulse = (close < open) and (candleBody / candleRange > bodyToRangeRatio) and (upperWick < (candleBody * wickRatio)) and (lowerWick < (candleBody * wickRatio))
// Vortex Indicator
length = input.int(6, title="Vortex Length")
vi_pos = ta.cum(math.abs(high - low[1])) - ta.cum(math.abs(high - low[1])[length])
vi_neg = ta.cum(math.abs(low - high[1])) - ta.cum(math.abs(low - high[1])[length])
tr = ta.cum(ta.atr(1)) - ta.cum(ta.atr(1)[length])
vi_pos_indicator = vi_pos / tr
vi_neg_indicator = vi_neg / tr
// Crossover Signals
vi_crossover = ta.crossover(vi_pos_indicator, vi_neg_indicator)
vi_crossunder = ta.crossunder(vi_pos_indicator, vi_neg_indicator)
// Moving Direction EMA Indicators
emaLength1 = 8
emaLength2 = 14
emaSource = hlcc4
movingDirection1 = ta.ema(emaSource, emaLength1)
movingDirection2 = ta.ema(emaSource, emaLength2)
// Moving Direction Cross Signals
md_crossover = ta.crossover(movingDirection1, movingDirection2)
md_crossunder = ta.crossunder(movingDirection1, movingDirection2)
// Combined Buy/Sell Conditions
buySignal = isBullishImpulse and (vi_crossover or md_crossover)
sellSignal = isBearishImpulse and (vi_crossunder or md_crossunder)
// Plot Buy/Sell Signals
plotshape(series=buySignal, title="Buy Signal", location=location.belowbar, color=color.green, style=shape.labelup, text="BUY")
plotshape(series=sellSignal, title="Sell Signal", location=location.abovebar, color=color.red, style=shape.labeldown, text="SELL")
// Alerts
alertcondition(buySignal, title="Buy Alert", message="Buy signal detected on Impulse Candle with Vortex & EMA confirmation.")
alertcondition(sellSignal, title="Sell Alert", message="Sell signal detected on Impulse Candle with Vortex & EMA confirmation.")
// Plot EMA Lines
plot(movingDirection1, title="Moving Direction 1 (EMA 8, hlcc4)", color=color.orange, linewidth=1, style=plot.style_line)
plot(movingDirection2, title="Moving Direction 2 (EMA 14, hlcc4)", color=color.purple, linewidth=1, style=plot.style_line)
// Highlight Impulse Candles
bgcolor(isBullishImpulse ? color.new(color.green, 90) : na, title="Bullish Impulse Highlight")
bgcolor(isBearishImpulse ? color.new(color.red, 90) : na, title="Bearish Impulse Highlight")
السلام عليكم
هو الان ضبط 90% من المؤشر الاصلي لكن متأخر بشمعة او شمعتين لكن اكتشفت فقرة وهية في جارت اكو خيار mixed privious candels ومحدده(ا 2) هل هو له تأثير??
اشكرك جدا على تعبك معي جدا جدا وهذه صورة توصح
هذه الصورة بين مؤشر الاصلي والذي عملته انت
الملف المرفق 564597
وهذه اعدادات المؤشر الاصلي
الملف المرفق 564598
يا اخي انسى المؤشر الاصلي ,احكيلي عن مؤشري انا ,شو اللي ناقصه بالضبط
عشان اضيفه
اهلا اخي ممكن تضيف هذه
Minimum Pushing Candle in Previous"
هذه الإضافة قد تكون مرتبطة بتحديد عدد معين من الشموع التي يجب أن تكون "دافعة" (pushing candle) في الاتجاه السابق لتأكيد قوة الاتجاه الحالي.
تفصيل التفسير:
Minimum (الحد الأدنى): يحدد عدد معين من الشموع التي يجب أن تحقق شروطًا معينة.
Pushing Candle (الشمعة الدافعة): تشير عادةً إلى شمعة ذات زخم قوي (إما صعودي أو هبوطي) تتميز بجسم طويل مقارنة بالظلال.
In Previous (في السابق): يعني أن الشموع التي يتم تقييمها هي من الفترات الزمنية السابقة (مثل X عدد من الشموع الماضية).
السلام عليكم
//@version=5
indicator("AX globals with Impulse Candles", overlay=true)
// Input settings
actionBoxLength = input.int(3, title="Action Box Length (Bars)")
buyBoxColor = input.color(color.new(color.green, 30), title="Buy Signal Box Color")
sellBoxColor = input.color(color.new(color.red, 30), title="Sell Signal Box Color")
showActionBoxes = input.bool(true, title="Show Action Signal Boxes")
wickRatio = input.float(1.0, title="Wick Ratio (e.g., 3 for 300%)")
bodyToRangeRatio = input.float(0.5, title="Candle Body-to-Range Ratio")
minPushingCandles = input.int(1, title="Minimum Pushing Candles in Previous") // Start with 1 for testing
// Candle Properties
candleBody = math.abs(close - open)
candleRange = high - low
upperWick = high - math.max(open, close)
lowerWick = math.min(open, close) - low
// Impulse Candle Conditions
isBullishImpulse = (close > open) and (candleBody / candleRange > bodyToRangeRatio) and (upperWick < (candleBody * wickRatio)) and (lowerWick < (candleBody * wickRatio))
isBearishImpulse = (close < open) and (candleBody / candleRange > bodyToRangeRatio) and (upperWick < (candleBody * wickRatio)) and (lowerWick < (candleBody * wickRatio))
// Debugging: Highlight Pushing Candles
bgcolor(isBullishImpulse ? color.new(color.green, 90) : na, title="Bullish Impulse Highlight")
bgcolor(isBearishImpulse ? color.new(color.red, 90) : na, title="Bearish Impulse Highlight")
// Count Minimum Pushing Candles in Previous Bars
bullishPushingCount = 0
bearishPushingCount = 0
for i = 1 to minPushingCandles
bullishPushingCount := bullishPushingCount + (isBullishImpulse[i] ? 1 : 0)
bearishPushingCount := bearishPushingCount + (isBearishImpulse[i] ? 1 : 0)
hasEnoughBullishPushing = bullishPushingCount >= minPushingCandles
hasEnoughBearishPushing = bearishPushingCount >= minPushingCandles
// Debugging: Plot Counts
plot(bullishPushingCount, title="Bullish Pushing Count", color=color.green)
plot(bearishPushingCount, title="Bearish Pushing Count", color=color.red)
// Vortex Indicator
length = input.int(6, title="Vortex Length")
vi_pos = ta.cum(math.abs(high - low[1])) - ta.cum(math.abs(high - low[1])[length])
vi_neg = ta.cum(math.abs(low - high[1])) - ta.cum(math.abs(low - high[1])[length])
tr = ta.cum(ta.atr(1)) - ta.cum(ta.atr(1)[length])
vi_pos_indicator = vi_pos / tr
vi_neg_indicator = vi_neg / tr
// Crossover Signals
vi_crossover = ta.crossover(vi_pos_indicator, vi_neg_indicator)
vi_crossunder = ta.crossunder(vi_pos_indicator, vi_neg_indicator)
// Moving Direction EMA Indicators
emaLength1 = 8
emaLength2 = 14
emaSource = hlcc4
movingDirection1 = ta.ema(emaSource, emaLength1)
movingDirection2 = ta.ema(emaSource, emaLength2)
// Moving Direction Cross Signals
md_crossover = ta.crossover(movingDirection1, movingDirection2)
md_crossunder = ta.crossunder(movingDirection1, movingDirection2)
// Combined Buy/Sell Conditions
buySignal = hasEnoughBullishPushing and vi_crossover and md_crossover
sellSignal = hasEnoughBearishPushing and vi_crossunder and md_crossunder
// Debugging: Display Buy/Sell Conditions
plotshape(series=hasEnoughBullishPushing ? 1 : na, title="Enough Bullish Pushing", location=location.bottom, color=color.green, style=shape.triangleup)
plotshape(series=hasEnoughBearishPushing ? 1 : na, title="Enough Bearish Pushing", location=location.top, color=color.red, style=shape.triangledown)
// Plot Buy/Sell Signals
plotshape(series=buySignal, title="Buy Signal", location=location.belowbar, color=color.green, style=shape.labelup, text="BUY")
plotshape(series=sellSignal, title="Sell Signal", location=location.abovebar, color=color.red, style=shape.labeldown, text="SELL")
// Alerts
alertcondition(buySignal, title="Buy Alert", message="Buy signal detected on Impulse Candle with Vortex & EMA confirmation.")
alertcondition(sellSignal, title="Sell Alert", message="Sell signal detected on Impulse Candle with Vortex & EMA confirmation.")
// Plot EMA Lines
plot(movingDirection1, title="Moving Direction 1 (EMA 8, hlcc4)", color=color.orange, linewidth=1, style=plot.style_line)
plot(movingDirection2, title="Moving Direction 2 (EMA 14, hlcc4)", color=color.purple, linewidth=1, style=plot.style_line)
شكررا لك اخي لكن لا توجد اي اشارة بيع او شراء لماذا؟
لما طلبت الاضافه صارت الاشارات اقل بس في الصوره فوق في اشاره .انا صورتها الك