def EMA19 = ExpAverage(19);
def EMA21 = ExpAverage(21);
def EMA23 = ExpAverage(23);
plot scan = Between(close, EMA19, EMA23);
https://github.com/ConnorSmiley/UseThinkScript/blob/main/EMA19 between EMA23
Join useThinkScript to post your question to a community of 21,000+ developers and traders.
Wait for the market to openhow to make it a watchlist column?
How to show YES, NO values if its between 19 and 23.
If I put this- its showing 1 and 0s but not sure if thats right
def EMA19 = ExpAverage(19);
def EMA21 = ExpAverage(21);
def EMA23 = ExpAverage(23);
plot scan = Between(close, EMA19, EMA23);
https://github.com/ConnorSmiley/UseThinkScript/blob/main/EMA19 between EMA23
Thanks, I didn't know. Theres no mention in the Thinkscript documentation. Its rubbish.@moxiesmiley
using between() , only works when the 2nd parameter is less than the 3rd.
plot scan = Between(close, EMA19, EMA23);
if ema19 is greater than ema23, then it won't work, it will never be true, even if close is between the values.
for this to always work, min and max would have to be added.
plot scan = Between(close, min(EMA19, EMA23) , max(EMA19, EMA23));
welcome. yes the docs could have been written much better. i tend to experiment a lot and come across things.Thanks, I didn't know. Theres no mention in the Thinkscript documentation. Its rubbish.
https://usethinkscript.com/threads/referencing-past-daily-bars.10162/#post-90671Also on TOS, If I keep editing the scan criteria. The existing alerts work? or Do I need to recreate the alert every time I modify,
Can anyone help with this.How do I add this to a scan. Below would work?
def EMA19 = ExpAverage(19);
def EMA21 = ExpAverage(21);
def EMA23 = ExpAverage(23);
plot scan = Between(close, min(EMA19, EMA23) , max(EMA19, EMA23));
Start a new thread and receive assistance from our community.
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.
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.