version one
touchesRedLine2 = not na(dojiLineDown2) and
(low <= line.get_y1(dojiLineDown2) and high >= line.get_y1(dojiLineDown2)) and
(open < line.get_y1(dojiLineDown2) and close > line.get_y1(dojiLineDown2)) and // تفتح تحت الخط وتغلق فوقه
(real_close > line.get_y1(dojiLineDown2)) and // إضافة شرط السعر الحقيقي فوق الخط الأحمر
(bar_index - dojiLineDownBarIndex2 <= 5) and // فقط خلال 5 شموع
not labelPlacedDown and // التأكد من أن الإشارة لم توضع مسبقًا
(((close > ema200 + pointDistance)and enableIndicator)or not enableIndicator) and
(((rsi<30 )and enableIndicator2)or not enableIndicator2) and is_stop_candle_down// الشرط الجديد: الشمعة فوق الـ EMA بمقدار نقطتين
if touchesGreenLine
label.new(bar_index, high, text="Sell", color=color.orange, textcolor=color.white, size=size.small, style=label.style_label_down)
labelPlacedUp := true
if touchesRedLine
label.new(bar_index, low, text="Buy", color=color.blue, textcolor=color.white, size=size.small, style=label.style_label_up)
labelPlacedDown := true // تم وضع الإشارة
if touchesGreenLine2
label.new(bar_index, high, text="Sell", color=color.orange, textcolor=color.white, size=size.small, style=label.style_label_down)
labelPlacedUp := true
if touchesRedLine2
label.new(bar_index, low, text="Buy", color=color.blue, textcolor=color.white, size=size.small, style=label.style_label_up)
labelPlacedDown := true // تم وضع الإشارة
alertcondition(touchesGreenLine or touchesRedLine or touchesGreenLine2 or touchesRedLine2 , title="Buy/Sell Alert", message="Signal detected: Buy or Sell")
var table statsTable = table.new(position.top_right, 1, 1, border_color=color.purple, bgcolor=color.new(color.black, 90))
table.cell(statsTable, 0, 0, "Moath Emad", text_color=color.white, bgcolor=color.black, text_size=size.auto)
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在
使用條款閱讀更多資訊。