0% found this document useful (0 votes)
46 views2 pages

ADX & LuxAlgo RSI Buy/Sell Signals

This document is a TradingView Pine Script that implements an ADX and LuxAlgo Ultimate RSI indicator for buy and sell signals. It calculates the ADX and RSI values, establishes conditions for buy and sell signals based on these indicators, and plots the signals on the chart. Additionally, it includes alert conditions for triggering notifications when buy or sell signals occur.

Uploaded by

Ali Ahmed
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
46 views2 pages

ADX & LuxAlgo RSI Buy/Sell Signals

This document is a TradingView Pine Script that implements an ADX and LuxAlgo Ultimate RSI indicator for buy and sell signals. It calculates the ADX and RSI values, establishes conditions for buy and sell signals based on these indicators, and plots the signals on the chart. Additionally, it includes alert conditions for triggering notifications when buy or sell signals occur.

Uploaded by

Ali Ahmed
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

//@version=6

indicator("ADX + LuxAlgo Ultimate RSI Buy/Sell (Filtered)", overlay=true)

//--------------------------------------------------
// INPUTS
//--------------------------------------------------

// ADX settings
adxLength = [Link](14, "ADX Length")
adxLevel = [Link](25, "ADX Threshold (X)")

// LuxAlgo RSI settings


rsiLength = [Link](14, "LuxAlgo RSI Length")
signalLen = [Link](14, "LuxAlgo Signal Length")

//--------------------------------------------------
// ADX CALCULATION (v6 CORRECT)
//--------------------------------------------------
[_, _, adxValue] = [Link](adxLength, adxLength)

//--------------------------------------------------
// LuxAlgo Ultimate RSI (CORE LOGIC)
//--------------------------------------------------
upper = [Link](close, rsiLength)
lower = [Link](close, rsiLength)
rng = upper - lower

d = close - close[1]
diff = upper > upper[1] ? rng :
lower < lower[1] ? -rng :
d

num = [Link](diff, rsiLength)


den = [Link]([Link](diff), rsiLength)

arsi = num / den * 50 + 50


signal = [Link](arsi, signalLen)

//--------------------------------------------------
// CROSS CALCULATIONS (GLOBAL)
//--------------------------------------------------
rsiCrossUp = [Link](arsi, signal)
signalCrossUp = [Link](signal, arsi)

//--------------------------------------------------
// ADX GATE
//--------------------------------------------------
adxActive = adxValue > adxLevel
//--------------------------------------------------
// FINAL SIGNALS (WITH RSI LOCATION FILTER)
//--------------------------------------------------
buySignal = adxActive and rsiCrossUp and arsi <= 50
sellSignal = adxActive and signalCrossUp and arsi >= 50

//--------------------------------------------------
// PLOTS
//--------------------------------------------------
plotshape(
buySignal,
title="BUY",
style=[Link],
location=[Link],
color=[Link],
size=[Link],
text="BUY"
)

plotshape(
sellSignal,
title="SELL",
style=[Link],
location=[Link],
color=[Link],
size=[Link],
text="SELL"
)

//--------------------------------------------------
// ALERTS
//--------------------------------------------------
alertcondition(buySignal, "BUY Signal",
"ADX > X and LuxAlgo RSI cross UP below/equal 50")

alertcondition(sellSignal, "SELL Signal",


"ADX > X and LuxAlgo RSI signal cross UP above/equal 50")

You might also like