Not getting alerts for custom study, any suggestions?

Mutagenix

New member
Here's the code I'm working with. Trying to get it to send me alerts for any result over 1%.
It's a custom watchlist column if that makes a difference. I've watched it meet the criteria
several times but haven't received any alerts. Where am I going wrong here?

plot x = Round(100 * ((close / open) - 1), 1);

x.AssignValueColor( if x < 0 then Color.ORANGE else Color.CYAN);

def condition = if x > 1.0 then 1 else 0;
Alert(condition, ”text”, Alert.BAR);
 
Solution
Here's the code I'm working with. Trying to get it to send me alerts for any result over 1%.
It's a custom watchlist column if that makes a difference. I've watched it meet the criteria
several times but haven't received any alerts. Where am I going wrong here?

plot x = Round(100 * ((close / open) - 1), 1);

x.AssignValueColor( if x < 0 then Color.ORANGE else Color.CYAN);

def condition = if x > 1.0 then 1 else 0;
Alert(condition, ”text”, Alert.BAR);

https://usethinkscript.com/threads/...lert-notifications-via-phone.5430/#post-64701
5/2021
No, we cannot trigger alerts from within Custom Watchlist Columns... The Alert() code will be ignored... There is no fix for this...
Here's the code I'm working with. Trying to get it to send me alerts for any result over 1%.
It's a custom watchlist column if that makes a difference. I've watched it meet the criteria
several times but haven't received any alerts. Where am I going wrong here?

plot x = Round(100 * ((close / open) - 1), 1);

x.AssignValueColor( if x < 0 then Color.ORANGE else Color.CYAN);

def condition = if x > 1.0 then 1 else 0;
Alert(condition, ”text”, Alert.BAR);

https://usethinkscript.com/threads/...lert-notifications-via-phone.5430/#post-64701
5/2021
No, we cannot trigger alerts from within Custom Watchlist Columns... The Alert() code will be ignored... There is no fix for this...
 
Solution
@halcyonguy had the perfect solution. Ran the script as a true/false scan criteria with upper and lower limits and then saved it as a watchlist. Very elegant workaround.

@Mutagenix could you pls show me/send me example of this?..I just created quite complicated (long code) custom column and would like to set alert onthis..so its still valid above statment that its possible just on scan and so with 3min. delay?..
 
@Mutagenix could you pls show me/send me example of this?..I just created quite complicated (long code) custom column and would like to set alert onthis..so its still valid above statment that its possible just on scan and so with 3min. delay?..

It may or may not be applicable to your code, but instead of running
the script as a custom watchlist column, use the same code in your scan tab.

Under studies click on custom study and paste your code in the editor.
Save that as a custom scan query and it becomes a watchlist that you can
now set alerts for. It will update every few minutes like a normal scan.

The only limitation I've seen is that if you have too much wiggle room in your
scan criteria, you'll get a lot of erroneous results. You may find yourself having
to add limiting variables to get higher quality results.
 

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

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

87k+ Posts
252 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.
Back
Top