Tradingview Convert Tradingview Lux Algo

Tradingview

supercool

New member
Folks Any thoughts on what Lux Algo oscillator could be based on. Here is a screen shot.

8WxyydH.png
 

chillc15

New member
From LuxAlgo - Have to purchase it.

https://www.tradingview.com/script/S8svsT4N-Lux-Oscillator-Premium/

The Lux Oscillator is inspired by stochastics and market balance. The oscillator is a responsive ribbon which at times provides earlier signals compared to a normal stochastic . When the oscillator crosses over to become blue this is a bullish signal and when the oscillator crosses over to become red this is a bearish signal. It also is great for spotting divergences. This can give the user opportunities to enter earlier into positions.

Lux Oscillator works great in confluence with our other script Lux Algo V2. It works on most markets especially crypto & forex. It also excels in ranging markets and can be used on any timeframe.

The source code of this study is protected and the author decides who can use it. You can add it to your favorites but you'll only be able to use it after the author grants permission. Contact LuxAlgo for more information.
 

New Indicator: Buy the Dip

Check out our Buy the Dip indicator and see how it can help you find profitable swing trading ideas. Scanner, watchlist columns, and add-ons are included.

Download the indicator

tam

New member
Hi guys, I try to replicate the Lux indicator for quite a long time now, and abt to quit, but reading these posts is motivating. So I guess I should register to the forum and share what I found

The Reversal Zone most likely comes from the Adaptive Price Zone Indicator
you can check it out on TV: https://www.tradingview.com/script/eoz8cGtU-Adaptive-Price-Zone-Indicator/
with these settings NPeriods = 500, NBandPct = 5 (still little inaccurate lol)
after that, the outside bands come from the Average True Range (type = EMA, period = 20)

The EQ cloud is actually the middle line of the Adaptive Price Zone Indicator, one line is the current value, and the other is offset 30 bars

For comparison: Spy 5min chart (the first one is what I come up with so far)
https://drive.google.com/file/d/1AYhhbYy8BHXLInl9VQyUjqUWCtYcQFNh/view?usp=sharing

https://drive.google.com/file/d/1bm6NceXSQCqX7zvpxzQ0f0TKMiOyUNjG/view?usp=sharing
 
Last edited:

Chemmy

Member
VIP
5cRBkR4.png


Hi all, so I just happened to be scanning TradingView and found the Lux Algo -- thought it looked interesting so I came on here, and saw this discussion. Here is my first attempt at coding this, using a combination of the Adaptive Zones study and the Wave Oscillator study. This is an upper study, but I included the Wave Oscillator in the lower area for reference. It allows options for signals from both studies, but the signals are based on having signals from BOTH studies fire off within 3 candles of each other.

This is my first longer indicator I've coded, so any feedback/criticism is more than welcome.

Code:
# Adaptive Zones with Wave Oscillator for Momentum
# Adaptive Price Zone by BenTen at useThinkScript.com
# Converted from https://www.tradingview.com/script/eoz8cGtU-Adaptive-Price-Zone-Indicator/
# Wave oscillator by LazyBear on TV... I think

input nPeriods = 200;
input nBandPct = 3;
input price = close;
input showAdaptive = no;

def xHL = high - low;
def nP = ceil(sqrt(nPeriods));
def xVal1 = expAverage(expAverage(close, nP), nP);
def xVal2 = expAverage(expAverage(xHL, nP), nP);
def UpBand = nBandPct * xVal2 + xVal1;
def DnBand = xVal1 - nBandPct * xVal2;

plot ub = UpBand;
plot db = DnBand;

ub.AssignValueColor(color.CYAN);
db.AssignValueColor(color.MAGENTA);

## Adaptive bands rejection/cross signals
def uppies =  price > dnband and low[1] <= dnband;
def downies = price < upband and high[1] >= upband;
def downsig =  downies and (downies[1] is false and downies[2] is false and downies[3] is false
     and downies[4] is false and downies[5] is false);
def upsig = uppies and (uppies[1] is false and uppies[2] is false and uppies[3] is false
     and uppies[4] is false and uppies[5] is false);

plot crossArrowsUp = upsig and showAdaptive;
crossArrowsUp.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);
crossArrowsUp.SetDefaultColor(Color.green);
crossArrowsUp.SetLineWeight(1);

plot crossArrowsDn = downsig and showAdaptive;
crossArrowsDn.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);
crossArrowsDn.SetDefaultColor(Color.red);
crossArrowsDn.SetLineWeight(1);

## Wavetrend Oscillator section
input Channel_Length = 10; #10
input Average_Length = 21; #10
def over_bought_1 = 60;
def over_bought_2 = 53;
def over_sold_1 = -60;
def over_sold_2 = -53;

input show_wave_alerts = no;
def ap = hlc3;
def esa = ExpAverage(ap, Channel_Length);
def d = ExpAverage(AbsValue(ap - esa), Channel_Length);
def ci = (ap - esa) / (0.015 * d);
def tci = ExpAverage(ci, Average_Length);
def wt1 = tci;
def wt2 = SimpleMovingAvg(wt1, 4);

## Wave Signal Logic
def signal1 = wt1 crosses above wt2 and wt1 < over_sold_2;
def Signal = if signal1  then (signal1 * over_sold_2) else Double.NaN;

def signal2 = wt1 crosses below wt2 and wt1 > over_bought_2;
def Signal2_ = if signal2  then (signal2 * over_bought_2) else Double.NaN;

plot wave_up = if show_wave_alerts and signal1  then (signal1 * over_sold_2) else Double.NaN;
wave_up.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);
wave_up.SetDefaultColor(Color.light_green);
wave_up.SetLineWeight(1);

plot wave_down = if show_wave_alerts and signal2  then (signal2 * over_bought_2) else Double.NaN;
wave_down.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);
wave_down.SetDefaultColor(Color.red);
wave_down.SetLineWeight(1);

def full_sig_up = (signal is true and upsig) or (signal is true and upsig[1]) or (signal is true and upsig[2])
     or (signal is true and upsig[3]) or (upsig and signal[1] is true) or (upsig and signal[2] is true)
     or (upsig and signal[3] is true);

plot Long = full_sig_up;
Long.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);
Long.SetDefaultColor(Color.dark_green);
Long.SetLineWeight(5);

def full_sig_dn = (signal2_ is true and downsig) or (signal2_ is true and downsig[1]) or (signal2_ is true
    and downsig[2]) or (signal2_ is true and downsig[3]) or (downsig and signal2_[1] is true)
     or (downsig and signal2_[2] is true) or (downsig and signal2_[3] is true);

plot Short = full_sig_dn;
Short.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);
Short.SetDefaultColor(Color.dark_red);
Short.SetLineWeight(5);
 

Santhosh

Member
VIP
5cRBkR4.png


Hi all, so I just happened to be scanning TradingView and found the Lux Algo -- thought it looked interesting so I came on here, and saw this discussion. Here is my first attempt at coding this, using a combination of the Adaptive Zones study and the Wave Oscillator study. This is an upper study, but I included the Wave Oscillator in the lower area for reference. It allows options for signals from both studies, but the signals are based on having signals from BOTH studies fire off within 3 candles of each other.

This is my first longer indicator I've coded, so any feedback/criticism is more than welcome.

Code:
# Adaptive Zones with Wave Oscillator for Momentum
# Adaptive Price Zone by BenTen at useThinkScript.com
# Converted from https://www.tradingview.com/script/eoz8cGtU-Adaptive-Price-Zone-Indicator/
# Wave oscillator by LazyBear on TV... I think

input nPeriods = 200;
input nBandPct = 3;
input price = close;
input showAdaptive = no;

def xHL = high - low;
def nP = ceil(sqrt(nPeriods));
def xVal1 = expAverage(expAverage(close, nP), nP);
def xVal2 = expAverage(expAverage(xHL, nP), nP);
def UpBand = nBandPct * xVal2 + xVal1;
def DnBand = xVal1 - nBandPct * xVal2;

plot ub = UpBand;
plot db = DnBand;

ub.AssignValueColor(color.CYAN);
db.AssignValueColor(color.MAGENTA);

## Adaptive bands rejection/cross signals
def uppies =  price > dnband and low[1] <= dnband;
def downies = price < upband and high[1] >= upband;
def downsig =  downies and (downies[1] is false and downies[2] is false and downies[3] is false
     and downies[4] is false and downies[5] is false);
def upsig = uppies and (uppies[1] is false and uppies[2] is false and uppies[3] is false
     and uppies[4] is false and uppies[5] is false);

plot crossArrowsUp = upsig and showAdaptive;
crossArrowsUp.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);
crossArrowsUp.SetDefaultColor(Color.green);
crossArrowsUp.SetLineWeight(1);

plot crossArrowsDn = downsig and showAdaptive;
crossArrowsDn.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);
crossArrowsDn.SetDefaultColor(Color.red);
crossArrowsDn.SetLineWeight(1);

## Wavetrend Oscillator section
input Channel_Length = 10; #10
input Average_Length = 21; #10
def over_bought_1 = 60;
def over_bought_2 = 53;
def over_sold_1 = -60;
def over_sold_2 = -53;

input show_wave_alerts = no;
def ap = hlc3;
def esa = ExpAverage(ap, Channel_Length);
def d = ExpAverage(AbsValue(ap - esa), Channel_Length);
def ci = (ap - esa) / (0.015 * d);
def tci = ExpAverage(ci, Average_Length);
def wt1 = tci;
def wt2 = SimpleMovingAvg(wt1, 4);

## Wave Signal Logic
def signal1 = wt1 crosses above wt2 and wt1 < over_sold_2;
def Signal = if signal1  then (signal1 * over_sold_2) else Double.NaN;

def signal2 = wt1 crosses below wt2 and wt1 > over_bought_2;
def Signal2_ = if signal2  then (signal2 * over_bought_2) else Double.NaN;

plot wave_up = if show_wave_alerts and signal1  then (signal1 * over_sold_2) else Double.NaN;
wave_up.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);
wave_up.SetDefaultColor(Color.light_green);
wave_up.SetLineWeight(1);

plot wave_down = if show_wave_alerts and signal2  then (signal2 * over_bought_2) else Double.NaN;
wave_down.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);
wave_down.SetDefaultColor(Color.red);
wave_down.SetLineWeight(1);

def full_sig_up = (signal is true and upsig) or (signal is true and upsig[1]) or (signal is true and upsig[2])
     or (signal is true and upsig[3]) or (upsig and signal[1] is true) or (upsig and signal[2] is true)
     or (upsig and signal[3] is true);

plot Long = full_sig_up;
Long.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);
Long.SetDefaultColor(Color.dark_green);
Long.SetLineWeight(5);

def full_sig_dn = (signal2_ is true and downsig) or (signal2_ is true and downsig[1]) or (signal2_ is true
    and downsig[2]) or (signal2_ is true and downsig[3]) or (downsig and signal2_[1] is true)
     or (downsig and signal2_[2] is true) or (downsig and signal2_[3] is true);

plot Short = full_sig_dn;
Short.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);
Short.SetDefaultColor(Color.dark_red);
Short.SetLineWeight(5);
Thank you. My early research indicates that the 3 minute time frame is where this indicator performs best. I often trade in 1 and occasionally 2 minute intervals. Are there any input settings that should be changed for optimal performance in one or two minute time frames?. Thank you
 

Chemmy

Member
VIP
Thank you. My early research indicates that the 3 minute time frame is where this indicator performs best. I often trade in 1 and occasionally 2 minute intervals. Are there any input settings that should be changed for optimal performance in one or two minute time frames?. Thank you
So I'm still working on this indicator but I probably designed it with a bit of bias on the 3 minute, given that that's where I usually trade. However, for the 1 or 2 minute time frame I think your best bet would be to adjust the "n periods" or "n band pct" parameters to be slightly higher -- mainly because the adaptive zones are the more conservative half of this study anwyays. Here is SPY from friday on the 1 minute time frame, with "n periods" = 150 and "n band pct" = 3. All other settings should be default here, let me know your thoughts if you try it!
Bn9pMww.png
 

FOTM_8888

Active member
VIP
So I'm still working on this indicator but I probably designed it with a bit of bias on the 3 minute, given that that's where I usually trade. However, for the 1 or 2 minute time frame I think your best bet would be to adjust the "n periods" or "n band pct" parameters to be slightly higher -- mainly because the adaptive zones are the more conservative half of this study anwyays. Here is SPY from friday on the 1 minute time frame, with "n periods" = 150 and "n band pct" = 3. All other settings should be default here, let me know your thoughts if you try it!
Bn9pMww.png
great job! a quick favor, can you share this chart system with that? thanks in advance
 

Santhosh

Member
VIP
So I'm still working on this indicator but I probably designed it with a bit of bias on the 3 minute, given that that's where I usually trade. However, for the 1 or 2 minute time frame I think your best bet would be to adjust the "n periods" or "n band pct" parameters to be slightly higher -- mainly because the adaptive zones are the more conservative half of this study anwyays. Here is SPY from friday on the 1 minute time frame, with "n periods" = 150 and "n band pct" = 3. All other settings should be default here, let me know your thoughts if you try it!
Bn9pMww.png
Thank you very much

I think your best bet would be to adjust the "n periods" or "n band pct" parameters to be slightly higher -------As the new n period setting of "150" is lower than the previous setting of "200," you are implying a little lower value for the 1 minute time frame. Is that true?. I'll give it a go with these updated settings and let you know what I think.
Thanks
 

Chemmy

Member
VIP
Thank you very much

I think your best bet would be to adjust the "n periods" or "n band pct" parameters to be slightly higher -------As the new n period setting of "150" is lower than the previous setting of "200," you are implying a little lower value for the 1 minute time frame. Is that true?. I'll give it a go with these updated settings and let you know what I think.
Thanks
Yes sorry, you're correct, so as I said I'm still playing with the parameters here a lot -- since I didn't build either individual study, it may be better to ask @BenTen for his opinion on things pertaining to say, the Adaptive Zones portion on lower time frames. But as always, whatever works best in your own personal experience after testing is best! There's a lot of stuff I still want to add to this study so I'll be updating as I can.
 

Volatility Trading Range

VTR is a momentum indicator that shows if a stock is overbought or oversold based on its Weekly and Monthly average volatility trading range.

Download the indicator

Similar threads

The Market Trading Game Changer

Join 2,500+ subscribers inside the useThinkScript VIP Membership Club
  • Exclusive indicators
  • Proven strategies & setups
  • Private Discord community
  • ‘Buy The Dip’ signal alerts
  • Exclusive members-only content
  • Add-ons and resources
  • 1 full year of unlimited support

Frequently Asked Questions

What is useThinkScript?

useThinkScript is the #1 community of stock market investors using indicators and other tools to power their trading strategies. Traders of all skill levels use our forums to learn about scripting and indicators, help each other, and discover new ways to gain an edge in the markets.

How do I get started?

We get it. Our forum can be intimidating, if not overwhelming. With thousands of topics, tens of thousands of posts, our community has created an incredibly deep knowledge base for stock traders. No one can ever exhaust every resource provided on our site.

If you are new, or just looking for guidance, here are some helpful links to get you started.

What are the benefits of VIP Membership?
VIP members get exclusive access to these proven and tested premium indicators: Buy the Dip, Advanced Market Moves 2.0, Take Profit, and Volatility Trading Range. In addition, VIP members get access to over 50 VIP-only custom indicators, add-ons, and strategies, private VIP-only forums, private Discord channel to discuss trades and strategies in real-time, customer support, trade alerts, and much more. Learn all about VIP membership here.
How can I access the premium indicators?
To access the premium indicators, which are plug and play ready, sign up for VIP membership here.
Top