DMI / ADX / RSI assistance

BullParagon

New member
I am looking to add a chart alert for instances where ADX is sub-25 for extended periods (10+ bars). and then is ascending for 3 bars. My idea is put an arrow on the chart each time we see that low and boring ADX for a long period, with a sudden ADX surge. I am trying to capture an easy visual for back testing charts.
If the results are as strong as they look to be so far, I will build a scan for this set up.
Thank you in advance to anyone who can help with plotting this arrow on the charts.


Also need help to paint the background based on the following logic:
Pain the background Red if any of the following conditions are met:
ADX is lower than 2 bars ago
or
RSI is lower than 2 bars ago



Thanks in advance.

Good Evening all. I am looking for a little help. I am using the DMI Oscilator lately and really liking it.

I am trying to add 2 other indicators in to the upper portion of the chart.
I would like to know when RSI is over 50 and DMI is over 20.

Ideally additional candle colors add, Example, right now white for bullish DMI osc. It could be Cyan when RSI is also over 50 and DMI over 20. Then
The Black (Bearish candles) could turn magenta is RSI is under 50 and DMI is over 20.

A bonus would be if we can also add a script to change the background color to Red when RSI and/or DMI drops lower than what it was 2 bars ago.

I do have other scripts that paint candles based on RSI levels or other conditions, I am just not doing the best job combining the scripts together. Painting 4 colors based on multiple conditions is not my forte.
1720058180066.png
 
Last edited by a moderator:
I am looking to add a chart alert for instances where ADX is sub-25 for extended periods (10+ bars). and then is ascending for 3 bars. My idea is put an arrow on the chart each time we see that low and boring ADX for a long period, with a sudden ADX surge. I am trying to capture an easy visual for back testing charts.
If the results are as strong as they look to be so far, I will build a scan for this set up.
Thank you in advance to anyone who can help with plotting this arrow on the charts.


Also need help to paint the background based on the following logic:
Pain the background Red if any of the following conditions are met:
ADX is lower than 2 bars ago
or
RSI is lower than 2 bars ago



Thanks in advance.

Good Evening all. I am looking for a little help. I am using the DMI Oscilator lately and really liking it.

I am trying to add 2 other indicators in to the upper portion of the chart.
I would like to know when RSI is over 50 and DMI is over 20.

Ideally additional candle colors add, Example, right now white for bullish DMI osc. It could be Cyan when RSI is also over 50 and DMI over 20. Then
The Black (Bearish candles) could turn magenta is RSI is under 50 and DMI is over 20.

A bonus would be if we can also add a script to change the background color to Red when RSI and/or DMI drops lower than what it was 2 bars ago.

I do have other scripts that paint candles based on RSI levels or other conditions, I am just not doing the best job combining the scripts together. Painting 4 colors based on multiple conditions is not my forte.



here is the first question: adx,
a lower that draws arrows when your conditions are met

Code:
# ADX_below
declare lower;

def na = double.nan;
def bn = barnumber();
input length = 14;
input averageType = AverageType.WILDERS;

plot ADX = DMI(length, averageType).ADX;
ADX.SetDefaultColor(GetColor(5));

#-------------------
input adx_low_level = 20;
input bars_below = 10;
def adx_below = Sum((ADX < adx_low_level), bars_below) == bars_below;
#-----------------
input adx_rise_bars = 3;
def adx_rising = Sum((ADX > ADX[1]), adx_rise_bars) == adx_rise_bars;

#------------------
def adx_up = adx_rising and getvalue(adx_below, adx_rise_bars);
 
plot zup = if adx_up then adx else na;
zup.SetPaintingStrategy(PaintingStrategy.ARROW_UP);
zup.SetDefaultColor(Color.green);
zup.setlineweight(3);
zup.hidebubble();


input test_pulses = no;
plot z1 = if test_pulses then adx_below*11 else na;
plot z2 = if test_pulses then adx_rising*13 else na;
plot z3 = if test_pulses then adx_up*15 else na;

plot z4 = adx_low_level;
#
 
Last edited by a moderator:

Join useThinkScript to post your question to a community of 21,000+ developers and traders.

Similar threads

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

87k+ Posts
380 Online
Create Post

Similar threads

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.
Back
Top