NQ Breathe Indicator Help

grapetux

Member
yoyo! im trying to get this NQ100 breadth indicator to print all of its values as positions numbers on the histogram to save space and just all around look more clean. The code is calculating a ratio and there for when the volume flips to the negative side, the historgram flips negative and takes up more space, harder to compare values etc.. Heres the code I'm working with .

input market = {default NASDAQ};

def UVOLQ = close(“$UVOL/Q”);
def DVOLQ = close(“$DVOL/Q”);


#Nasdaq Breadth ratio
plot NASDratio = if (UVOLQ >= DVOLQ) then (UVOLQ / DVOLQ) else -(DVOLQ / UVOLQ) ;
AddLabel(yes, Concat(Round(NASDratio, 2), ” :1 NQ”), (if NASDratio >= 0 then Color.green else Color.red));

nasdratio.assignvalueColor(if nasdratio>nasdratio[1] then createcolor(25,75,125) else createcolor(95,95,95) );
-->nasdratio.assignvalueColor(if nasdratio>nasdratio[1] and nasdartio>0 then color.red else color.white; <-- example

Ideally I'd want all of the positive volume to be blue/white (increasing decreasing) and all the negative values red/white.. but all displayed as position values.

Any help would be greatly appreciated. Muchos gracias
 
This isn't quite what you asked for. I'm just trying to make sure that I am understanding the question at this point. Try the following code just for starters, and tell me if its more or less in line with what you're going for.

Code:
declare zerobase;
def UVOLQ = close(“$UVOL/Q”);
def DVOLQ = close(“$DVOL/Q”);
def UpVol = UVOLQ > DVOLQ;
plot NASDratio = (if UpVol then UVOLQ / DVOLQ else DVOLQ / UVOLQ);
NASDratio.setpaintingStrategy(paintingStrategy.HISTOGRAM);
nasdratio.assignvalueColor(if UpVol then color.green else color.red);

I am not sure what you mean by position values, my guess is that you want everything on the same side of the histogram, but just in different colors for up/down.
 

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

This isn't quite what you asked for. I'm just trying to make sure that I am understanding the question at this point. Try the following code just for starters, and tell me if its more or less in line with what you're going for.

Code:
declare zerobase;
def UVOLQ = close(“$UVOL/Q”);
def DVOLQ = close(“$DVOL/Q”);
def UpVol = UVOLQ > DVOLQ;
plot NASDratio = (if UpVol then UVOLQ / DVOLQ else DVOLQ / UVOLQ);
NASDratio.setpaintingStrategy(paintingStrategy.HISTOGRAM);
nasdratio.assignvalueColor(if UpVol then color.green else color.red);

I am not sure what you mean by position values, my guess is that you want everything on the same side of the histogram, but just in different colors for up/down.
nice this looks dope. Just so i'm clear, everything thats printing red would originally be volume<0 correct?

my only other request would be to have the ability to change the declining vol for each color be a different shade.
thanks for you help
 

Similar threads

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

87k+ Posts
627 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