Questions About "Crosses Above"

Sai

New member
VIP
Merry,
QQ on Crosses Above.

Close Crosses above means , we assume that if price moved around that moving average on that particular bar. But I am not seeing that in action .

For Example MSFT / NFLX / AVGO /DOCN / CROX which are sliced though 5 EMA on Daily candle . But in my watchlist column these are not flagged as Cross over happening today. They are showing as close above 5 EMA bucket but not falling under 5 EMA cross over bucket.

Not sure what did i miss. can you pls throw some light

# To Find stocks which are sliced through 5 EMA Today
def ema5 = MovAvgExponential("length" = 5) ;
AddLabel (yes, if close crosses above ema5 then "5EMACrossOver" else "", color.green) ;
 
Solution
Merry,
QQ on Crosses Above.

Close Crosses above means , we assume that if price moved around that moving average on that particular bar. But I am not seeing that in action .

For Example MSFT / NFLX / AVGO /DOCN / CROX which are sliced though 5 EMA on Daily candle . But in my watchlist column these are not flagged as Cross over happening today. They are showing as close above 5 EMA bucket but not falling under 5 EMA cross over bucket.

Not sure what did i miss. can you pls throw some light

# To Find stocks which are sliced through 5 EMA Today
def ema5 = MovAvgExponential("length" = 5) ;
AddLabel (yes, if close crosses above ema5 then "5EMACrossOver" else "", color.green) ;

Great question!
So when you use cross above, you...
Merry,
QQ on Crosses Above.

Close Crosses above means , we assume that if price moved around that moving average on that particular bar. But I am not seeing that in action .

For Example MSFT / NFLX / AVGO /DOCN / CROX which are sliced though 5 EMA on Daily candle . But in my watchlist column these are not flagged as Cross over happening today. They are showing as close above 5 EMA bucket but not falling under 5 EMA cross over bucket.

Not sure what did i miss. can you pls throw some light

# To Find stocks which are sliced through 5 EMA Today
def ema5 = MovAvgExponential("length" = 5) ;
AddLabel (yes, if close crosses above ema5 then "5EMACrossOver" else "", color.green) ;

Great question!
So when you use cross above, you only get ONE occurrence which is the exact bar where close crossed above the moving average.

Here is where close is positioned on the candle:
Nl6Jwez.png


In your example, MSFT close crossed above on the prior candle:
ZcKASHp.png

Yes, you can see the 5ema is still crossing on the current candle, but the MSFT close is greater than and already above the 5ema on the current candle. So it will no longer signal the close is crossing above the average.

Workarounds:
Not sure what you are looking for.
If you want to know when most of the candle has crosses above, your logic would use the low of the candle:
AddLabel (yes, if low crosses above ema5 then "5EMACrossOver" else "", color.green) ;

If you want to know about 'recent' crosses, your logic would look for the last few bars:
AddLabel (yes, if close crosses above ema5 within 2 bars then "5EMACrossOver" else "", color.green) ;

Hope this helps
 
Last edited:
Solution

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

Awesome. Thank you Merry!!!
Merry,

I have two scenarios i want to use Mov Avg Cross.

#1 i have one mov avg i am looking to get any ticker slices through that mov avg from bottom(Reversal) i want to get alert.

#2 if any ticker which was above mov avg but retest that mov avg(Pullback) i want to get alert.

How best can we use Mov avg cross logic for these pullbacks and reversals. Can you pls throw some light on above two scenarios pls
 
Merry,

I have two scenarios i want to use Mov Avg Cross.

#1 i have one mov avg i am looking to get any ticker slices through that mov avg from bottom(Reversal) i want to get alert.

#2 if any ticker which was above mov avg but retest that mov avg(Pullback) i want to get alert.

How best can we use Mov avg cross logic for these pullbacks and reversals. Can you pls throw some light on above two scenarios pls
go reread merrydays post.
price doesn't slice.
learn to describe actions with proper words.
why do you mention (Reversal)?

do you want to know when,
price is below an average line on one bar,
and above the average on the next bar?
 
Not sure if it is a correct ask, however would like to check if it is possible with thinkscript. Is there any we can identify when the 8 EMA line going through the candle as show in the below image. Please help.

1709175572493.png
 
Not sure if it is a correct ask, however would like to check if it is possible with thinkscript. Is there any we can identify when the 8 EMA line going through the candle as show in the below image. Please help.

View attachment 21198
Read through the above thread, so you can understand what the logic is doing and what the limitations are.
And then set up the filter in your scan hacker:
close crosses above MovAvgExponential("length" = 8)."AvgExp"
TL3DWIP.png
 
Not sure if it is a correct ask, however would like to check if it is possible with thinkscript. Is there any we can identify when the 8 EMA line going through the candle as show in the below image. Please help.

look at the picture and think about what is happening.
the high is above the ema8 line.
the low is below the ema8 line.

next, write a formula,

def ema8 = ...
def a = if high > ema8 and low < ema8 then 1 else 0;

will need a real formula for ema8.
 

Similar threads

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

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