BTC EMA+RSI Strong Signals

indicator("BTC EMA+RSI Strong Signals", overlay=true)
ema100 = ta.ema(close, 100)
ema200 = ta.ema(close, 200)
rsi = ta.rsi(close, 14)
// Фильтры тренда
isUptrend = ema100 > ema200
isDowntrend = ema100 < ema200
// Условия входа
longCondition = isUptrend and ta.crossover(close, ema100) and rsi < 30
shortCondition = isDowntrend and ta.crossunder(close, ema100) and rsi > 70
// TP/SL
tpLong = close * 1.025
slLong = close * 0.985
tpShort = close * 0.975
slShort = close * 1.015
// Отображение
plot(ema100, color=color.orange, title="EMA 100")
plot(ema200, color=color.red, title="EMA 200")
plot(longCondition ? tpLong : na, title="TP LONG", color=color.green)
plot(longCondition ? slLong : na, title="SL LONG", color=color.red)
plot(shortCondition ? tpShort : na, title="TP SHORT", color=color.green)
plot(shortCondition ? slShort : na, title="SL SHORT", color=color.red)
// Метки сигнала
plotshape(longCondition, location=location.belowbar, color=color.green, style=shape.labelup, text="LONG")
plotshape(shortCondition, location=location.abovebar, color=color.red, style=shape.labeldown, text="SHORT")
// Alertconditions
alertcondition(longCondition, title="BTC LONG", message='BTC LONG сигнал по цене {{close}}')
alertcondition(shortCondition, title="BTC SHORT", message='BTC SHORT сигнал по цене {{close}}')
// Webhook Alerts
if longCondition
alert('{"chat_id": "@exgosignal", "text": "BTC LONG сигнал по цене ' + str.tostring(close) + ' (TP +2.5%, SL -1.5%)"}', alert.freq_once_per_bar_close)
if shortCondition
alert('{"chat_id": "@exgosignal", "text": "BTC SHORT сигнал по цене ' + str.tostring(close) + ' (TP +2.5%, SL -1.5%)"}', alert.freq_once_per_bar_close)
if close >= tpLong
alert('{"chat_id": "@exgosignal", "text": "BTC LONG: цель достигнута по цене ' + str.tostring(close) + '"}', alert.freq_once_per_bar_close)
if close <= slLong
alert('{"chat_id": "@exgosignal", "text": "BTC LONG: сработал стоп по цене ' + str.tostring(close) + '"}', alert.freq_once_per_bar_close)
if close <= tpShort
alert('{"chat_id": "@exgosignal", "text": "BTC SHORT: цель достигнута по цене ' + str.tostring(close) + '"}', alert.freq_once_per_bar_close)
if close >= slShort
alert('{"chat_id": "@exgosignal", "text": "BTC SHORT: сработал стоп по цене ' + str.tostring(close) + '"}', alert.freq_once_per_bar_close)
indicator("BTC EMA+RSI Strong Signals", overlay=true)
ema100 = ta.ema(close, 100)
ema200 = ta.ema(close, 200)
rsi = ta.rsi(close, 14)
// Фильтры тренда
isUptrend = ema100 > ema200
isDowntrend = ema100 < ema200
// Условия входа
longCondition = isUptrend and ta.crossover(close, ema100) and rsi < 30
shortCondition = isDowntrend and ta.crossunder(close, ema100) and rsi > 70
// TP/SL
tpLong = close * 1.025
slLong = close * 0.985
tpShort = close * 0.975
slShort = close * 1.015
// Отображение
plot(ema100, color=color.orange, title="EMA 100")
plot(ema200, color=color.red, title="EMA 200")
plot(longCondition ? tpLong : na, title="TP LONG", color=color.green)
plot(longCondition ? slLong : na, title="SL LONG", color=color.red)
plot(shortCondition ? tpShort : na, title="TP SHORT", color=color.green)
plot(shortCondition ? slShort : na, title="SL SHORT", color=color.red)
// Метки сигнала
plotshape(longCondition, location=location.belowbar, color=color.green, style=shape.labelup, text="LONG")
plotshape(shortCondition, location=location.abovebar, color=color.red, style=shape.labeldown, text="SHORT")
// Alertconditions
alertcondition(longCondition, title="BTC LONG", message='BTC LONG сигнал по цене {{close}}')
alertcondition(shortCondition, title="BTC SHORT", message='BTC SHORT сигнал по цене {{close}}')
// Webhook Alerts
if longCondition
alert('{"chat_id": "@exgosignal", "text": "BTC LONG сигнал по цене ' + str.tostring(close) + ' (TP +2.5%, SL -1.5%)"}', alert.freq_once_per_bar_close)
if shortCondition
alert('{"chat_id": "@exgosignal", "text": "BTC SHORT сигнал по цене ' + str.tostring(close) + ' (TP +2.5%, SL -1.5%)"}', alert.freq_once_per_bar_close)
if close >= tpLong
alert('{"chat_id": "@exgosignal", "text": "BTC LONG: цель достигнута по цене ' + str.tostring(close) + '"}', alert.freq_once_per_bar_close)
if close <= slLong
alert('{"chat_id": "@exgosignal", "text": "BTC LONG: сработал стоп по цене ' + str.tostring(close) + '"}', alert.freq_once_per_bar_close)
if close <= tpShort
alert('{"chat_id": "@exgosignal", "text": "BTC SHORT: цель достигнута по цене ' + str.tostring(close) + '"}', alert.freq_once_per_bar_close)
if close >= slShort
alert('{"chat_id": "@exgosignal", "text": "BTC SHORT: сработал стоп по цене ' + str.tostring(close) + '"}', alert.freq_once_per_bar_close)
indicator("EMA+RSI Strong Confirmed Signals", overlay=true)
// --- Индикаторы
ema100 = ta.ema(close, 100)
ema200 = ta.ema(close, 200)
rsi = ta.rsi(close, 14)
vol = ta.sma(volume, 20) // средний объём
// --- Фильтры тренда
isUptrend = ema100 > ema200
isDowntrend = ema100 < ema200
// --- Усиленные условия входа
longCondition = isUptrend and ta.crossover(close, ema100) and rsi < 28 and volume > vol * 1.5
shortCondition = isDowntrend and ta.crossunder(close, ema100) and rsi > 72 and volume > vol * 1.5
// --- Take Profit и Stop Loss уровни
tpLong = close * 1.03
slLong = close * 0.975
tpShort = close * 0.97
slShort = close * 1.025
// --- Отображение на графике
plot(ema100, color=color.orange, title="EMA 100")
plot(ema200, color=color.red, title="EMA 200")
plot(longCondition ? tpLong : na, title="TP LONG", color=color.green)
plot(longCondition ? slLong : na, title="SL LONG", color=color.red)
plot(shortCondition ? tpShort : na, title="TP SHORT", color=color.green)
plot(shortCondition ? slShort : na, title="SL SHORT", color=color.red)
plotshape(longCondition, location=location.belowbar, color=color.lime, style=shape.labelup, text="STRONG LONG")
plotshape(shortCondition, location=location.abovebar, color=color.red, style=shape.labeldown, text="STRONG SHORT")
// --- Alertconditions для webhook
alertcondition(longCondition, title="STRONG LONG Signal", message='{"chat_id": "@exgosignal", "text": "{{ticker}} STRONG LONG сигнал по цене {{close}} (TP 3%, SL -2.5%)"}')
alertcondition(shortCondition, title="STRONG SHORT Signal", message='{"chat_id": "@exgosignal", "text": "{{ticker}} STRONG SHORT сигнал по цене {{close}} (TP 3%, SL -2.5%)"}')
Script open-source
In pieno spirito TradingView, il creatore di questo script lo ha reso open-source, in modo che i trader possano esaminarlo e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricorda che la ripubblicazione del codice è soggetta al nostro Regolamento.
Per un accesso rapido a un grafico, aggiungi questo script ai tuoi preferiti: per saperne di più clicca qui.
Declinazione di responsabilità
Script open-source
In pieno spirito TradingView, il creatore di questo script lo ha reso open-source, in modo che i trader possano esaminarlo e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricorda che la ripubblicazione del codice è soggetta al nostro Regolamento.
Per un accesso rapido a un grafico, aggiungi questo script ai tuoi preferiti: per saperne di più clicca qui.