OPEN-SOURCE SCRIPT
Forex Liner SCALPING (No Repaint)

//version=5
indicator("Forex Liner SCALPING (No Repaint)", overlay=true, max_labels_count=500)
// ===== إعدادات سريعة للسكالبينج =====
pivotLen = input.int(1, "Pivot Sensitivity (أدق=1)")
emaLen = input.int(9, "EMA Trend")
rsiLen = input.int(7, "RSI Filter")
rsiMid = input.int(50, "RSI Mid Level")
showLabels = input.bool(true, "Show Labels")
// ===== الحسابات =====
ema = ta.ema(close, emaLen)
rsi = ta.rsi(close, rsiLen)
ph = ta.pivothigh(high, pivotLen, pivotLen)
pl = ta.pivotlow(low, pivotLen, pivotLen)
// ===== حفظ آخر قاع وقمة =====
var float lastLowPrice = na
var int lastLowBar = na
var float lastHighPrice = na
var int lastHighBar = na
if not na(pl)
lastLowPrice := pl
lastLowBar := bar_index - pivotLen
if not na(ph)
lastHighPrice := ph
lastHighBar := bar_index - pivotLen
// ===== موجة =====
var int wave = 0 // 1 شراء | -1 بيع
// ===== بداية موجة شراء =====
startBuy = not na(lastHighPrice) and close > lastHighPrice and wave != 1 and rsi > rsiMid
if startBuy and not na(lastLowBar)
wave := 1
if showLabels
label.new(lastLowBar, lastLowPrice, "BUY LOW", style=label.style_label_up, color=color.lime, textcolor=color.black)
// ===== بداية موجة بيع =====
startSell = not na(lastLowPrice) and close < lastLowPrice and wave != -1 and rsi < rsiMid
if startSell and not na(lastHighBar)
wave := -1
if showLabels
label.new(lastHighBar, lastHighPrice, "SELL HIGH", style=label.style_label_down, color=color.red, textcolor=color.white)
// ===== نهاية الموجة =====
endBuy = wave == 1 and close < lastLowPrice
if endBuy
wave := 0
if showLabels
label.new(bar_index, high, "END BUY", color=color.orange, style=label.style_label_down)
endSell = wave == -1 and close > lastHighPrice
if endSell
wave := 0
if showLabels
label.new(bar_index, low, "END SELL", color=color.orange, style=label.style_label_up)
indicator("Forex Liner SCALPING (No Repaint)", overlay=true, max_labels_count=500)
// ===== إعدادات سريعة للسكالبينج =====
pivotLen = input.int(1, "Pivot Sensitivity (أدق=1)")
emaLen = input.int(9, "EMA Trend")
rsiLen = input.int(7, "RSI Filter")
rsiMid = input.int(50, "RSI Mid Level")
showLabels = input.bool(true, "Show Labels")
// ===== الحسابات =====
ema = ta.ema(close, emaLen)
rsi = ta.rsi(close, rsiLen)
ph = ta.pivothigh(high, pivotLen, pivotLen)
pl = ta.pivotlow(low, pivotLen, pivotLen)
// ===== حفظ آخر قاع وقمة =====
var float lastLowPrice = na
var int lastLowBar = na
var float lastHighPrice = na
var int lastHighBar = na
if not na(pl)
lastLowPrice := pl
lastLowBar := bar_index - pivotLen
if not na(ph)
lastHighPrice := ph
lastHighBar := bar_index - pivotLen
// ===== موجة =====
var int wave = 0 // 1 شراء | -1 بيع
// ===== بداية موجة شراء =====
startBuy = not na(lastHighPrice) and close > lastHighPrice and wave != 1 and rsi > rsiMid
if startBuy and not na(lastLowBar)
wave := 1
if showLabels
label.new(lastLowBar, lastLowPrice, "BUY LOW", style=label.style_label_up, color=color.lime, textcolor=color.black)
// ===== بداية موجة بيع =====
startSell = not na(lastLowPrice) and close < lastLowPrice and wave != -1 and rsi < rsiMid
if startSell and not na(lastHighBar)
wave := -1
if showLabels
label.new(lastHighBar, lastHighPrice, "SELL HIGH", style=label.style_label_down, color=color.red, textcolor=color.white)
// ===== نهاية الموجة =====
endBuy = wave == 1 and close < lastLowPrice
if endBuy
wave := 0
if showLabels
label.new(bar_index, high, "END BUY", color=color.orange, style=label.style_label_down)
endSell = wave == -1 and close > lastHighPrice
if endSell
wave := 0
if showLabels
label.new(bar_index, low, "END SELL", color=color.orange, style=label.style_label_up)
オープンソーススクリプト
TradingViewの精神に則り、このスクリプトの作者はコードをオープンソースとして公開してくれました。トレーダーが内容を確認・検証できるようにという配慮です。作者に拍手を送りましょう!無料で利用できますが、コードの再公開はハウスルールに従う必要があります。
免責事項
この情報および投稿は、TradingViewが提供または推奨する金融、投資、トレード、その他のアドバイスや推奨を意図するものではなく、それらを構成するものでもありません。詳細は利用規約をご覧ください。
オープンソーススクリプト
TradingViewの精神に則り、このスクリプトの作者はコードをオープンソースとして公開してくれました。トレーダーが内容を確認・検証できるようにという配慮です。作者に拍手を送りましょう!無料で利用できますが、コードの再公開はハウスルールに従う必要があります。
免責事項
この情報および投稿は、TradingViewが提供または推奨する金融、投資、トレード、その他のアドバイスや推奨を意図するものではなく、それらを構成するものでもありません。詳細は利用規約をご覧ください。