It tells you how much % 1 moving MDA line away from crossing another, and it colors it based on whether it's above or below.


Active member

"Ck 1st" is abbreviation for "Check first", "9 Abv 200" simply means that the 9 MDA is above 200.

# avgs_per_diff_00

declare lower;

input avg1Type = Averagetype.simple;
input avg2type = Averagetype.simple;
input Avg1Length = 9;
input Avg2Length = 50;

def avg1 = MovingAverage(avg1Type, close, avg1Length);
def avg2 = MovingAverage(avg2Type, close, avg2Length);
def avgup = (avg1 > avg2);

#def AvgPercent = MovingAverage(avg1Type, close, avg1Length)-MovingAverage(avg2Type, close, avg2Length);
# plot percentDiff = (absValue(avgPercent)/movingaverage(avg1type,close,avg1length)) *100;

def Avg12diff = avg1 - avg2;

plot percentDiff = (absValue(avg12diff)/avg1) *100;
percentDiff.AssignValueColor(if avgup then percentDiff.color("up") else percentDiff.color("down"));

AssignBackgroundColor(if Avg1 is greater than or equal to Avg2 then (CreateColor(0, 102, 0)) else Color.light_GRAY);


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

  • I have my studies set up on the 15 minute chart without extended hours because because low volume throws everything out of wack such as VWAP.

  • Green square on the "9 ABV 50" means that the 9 MDA line has crossed the 50 MDA line.

  • If that square was white instead it would mean the 9 MDA is under the 50 MDA line.

  • Currently it's it has the value of "2.37" within the green square. That means the 9 MDA is 02.37 % above the 50 MDA line.

  • The RSI is separate. I have it there & color coded so I instantly know if I should avoid making the trade.

  • If you take a 2nd look at my layout you'll see "9 MA", "50 MA", and "200 MA ". Those are the actual moving average values. I use weighted moving averages because that's enables me to get the best result when using a bunch of other studies.

  • When I look for studies or indicators, I look for things to plug holes in the over all picture of a stock's movement. I created this scanner setup & scanner studies because I wanted to quickly glance at a scanner's output. I didn't like how I was slowly comparing the MDA values to each other for each stock was displayed, so I created the scanner study to "plug a hole".

I'm sorry, I should have explained my scanner set up.

Last edited by a moderator:

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

87k+ Posts
369 Online
Create Post

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.