Help understanding "Price" Crossing Moving Average

twistedchuck

New member
VIP
Hello...

I am trying to set up a daily EMA cross over scan on TOS.. Can someone explain the price part of the study when setting filter?

I want the scan to pick up the cross over regardless in realtime, and I am assuming the price condition being open or close will alert me once the candle (D) opens or closes during a cross which will be too late.
 

Attachments

  • Screenshot 2024-07-22 at 10.07.10 PM.png
    Screenshot 2024-07-22 at 10.07.10 PM.png
    60 KB · Views: 47
Solution
Hello...

I am trying to set up a daily EMA cross over scan on TOS.. Can someone explain the price part of the study when setting filter?

I want the scan to pick up the cross over regardless in realtime, and I am assuming the price condition being open or close will alert me once the candle (D) opens or closes during a cross which will be too late.

Yes, you would need to choose which part of the candle you want the moving average to cross:
open, close, high, low, hl2, hlc3, ohlc4, are just a few of your choices.

It should be noted that moving average cross over "price" is not considered efficient.
The use of a short ema crossing the longer ema better encompasses the moving average crossover purpose.
It will provide results...
Hello...

I am trying to set up a daily EMA cross over scan on TOS.. Can someone explain the price part of the study when setting filter?

I want the scan to pick up the cross over regardless in realtime, and I am assuming the price condition being open or close will alert me once the candle (D) opens or closes during a cross which will be too late.

Yes, you would need to choose which part of the candle you want the moving average to cross:
open, close, high, low, hl2, hlc3, ohlc4, are just a few of your choices.

It should be noted that moving average cross over "price" is not considered efficient.
The use of a short ema crossing the longer ema better encompasses the moving average crossover purpose.
It will provide results regardless of what part of the candle the moving average crosses.

Here is the two moving average cross. Compare it to your price cross and see what works best for your purposes.
VbmW4YW.png


PwukxVE.png
 
Solution

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

Yes, you would need to choose which part of the candle you want the moving average to cross:
open, close, high, low, hl2, hlc3, ohlc4, are just a few of your choices.

It should be noted that moving average cross over "price" is not considered efficient.
The use of a short ema crossing the longer ema better encompasses the moving average crossover purpose.
It will provide results regardless of what part of the candle the moving average crosses.

Here is the two moving average cross. Compare it to your price cross and see what works best for your purposes.
VbmW4YW.png


PwukxVE.png
Thank you, this worked!

Now I am looking for a code for the same thing but for simple moving average cross.. I just can't figure out what the equivalent to "AvgExp" for a simple moving avg as shown in the script you shared.
 
Thanks Halcyonguy , but I am looking for the exact script Merry shared but for the SMA. I need to be alerted in real time of the cross, and not at price open, close, etc..

The issue is that it is asking me to put a function for value, and I need it in real time, like Merry's original script she shared.

MovAvgExponential(length = 9). AvgExp crosses above MovAvgExponential(length = 21). AvgExp
So this , but for SMA.

Can anyone help?
 
Last edited:
Thanks Halcyonguy , but I am looking for the exact script Merry shared but for the SMA. I need to be alerted in real time of the cross, and not at price open, close, etc..

The issue is that it is asking me to put a function for value, and I need it in real time, like Merry's original script she shared.

MovAvgExponential(length = 9). AvgExp crosses above MovAvgExponential(length = 21). AvgExp
So this , but for SMA.

Can anyone help?

Here ya go:
SimpleMovingAvg("length" = 3)."SMA" crosses above SimpleMovingAvg("length" = 21)."SMA"
 

Similar threads

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

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