النتائج 1 إلى 15 من 15
الموضوع: سؤال برمجي للمبرمجين
- 23-01-2025, 01:26 PM #1
سؤال برمجي للمبرمجين
السلام عليكم اخوتي الكرام
انا لدي مؤشر عملته من قبل ايام يعتمد على تقاطع vi - و +vi وتطلع الاشارات بعد التقاطع لكن اريد ان اضيف شرط ان يطلع فقط على الشمعات الاندفاعية سواء بيعية او شرائية هل من ممكن تعديله لي؟
- 23-01-2025, 04:48 PM #2
//@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.")
- 23-01-2025, 05:19 PM #3
- 23-01-2025, 08:52 PM #4
هل يوجد احد يحل لي مشكلة؟
- 23-01-2025, 09:09 PM #5
طلبك كان اضافه و تم اضافة impulsive candle
- 23-01-2025, 11:56 PM #6
اخي هو يعتمد على 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)
- 24-01-2025, 12:25 AM #7
ممكن الرد
- 24-01-2025, 02:10 AM #8
السلام عليكم
هل هذا المطلوب ؟؟
//@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")
- 24-01-2025, 04:43 PM #9
- 25-01-2025, 12:40 PM #10
يا اخي انسى المؤشر الاصلي ,احكيلي عن مؤشري انا ,شو اللي ناقصه بالضبط
عشان اضيفه
- 27-01-2025, 01:31 PM #11
اهلا اخي ممكن تضيف هذه
Minimum Pushing Candle in Previous"
هذه الإضافة قد تكون مرتبطة بتحديد عدد معين من الشموع التي يجب أن تكون "دافعة" (pushing candle) في الاتجاه السابق لتأكيد قوة الاتجاه الحالي.
تفصيل التفسير:
Minimum (الحد الأدنى): يحدد عدد معين من الشموع التي يجب أن تحقق شروطًا معينة.
Pushing Candle (الشمعة الدافعة): تشير عادةً إلى شمعة ذات زخم قوي (إما صعودي أو هبوطي) تتميز بجسم طويل مقارنة بالظلال.
In Previous (في السابق): يعني أن الشموع التي يتم تقييمها هي من الفترات الزمنية السابقة (مثل X عدد من الشموع الماضية).
- 27-01-2025, 06:56 PM #12
السلام عليكم
//@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)
- 27-01-2025, 10:15 PM #13
- 29-01-2025, 11:53 PM #14
شكررا لك اخي لكن لا توجد اي اشارة بيع او شراء لماذا؟
- 29-01-2025, 11:58 PM #15
لما طلبت الاضافه صارت الاشارات اقل بس في الصوره فوق في اشاره .انا صورتها الك
الأكثر زيارة
رد مع اقتباس


