Recurring alert

bellbell63

New member
Am new to Thinkscript. I have a study that generates an alert when stock hits hi/low of the day. Have 50 yrs of programming experience but new to Thinkscript. Have written about a dozen so far.

I would like a script that would do the following:
When stock goes up +x% from my average price generate an alert (that I know how to do).
When that happens move the trigger price up another x%. So if my average price is 40 and using 1% when stock hits 40.40 if would get an alert and the new trigger level is 40.40 = + another 1%. It would be acceptable for each trigger to go up 1% from avg price instead of (40x1.01)x1.01x1.01...
And the same on the negative direction (-x%) at each step.
In general how do you make a script run against a watchlist rather than be imbedded in a chart? I would like the above script to watch for x% changes against the "all account positions" or other watchlists. I know this can generate a lot of alerts but they only go to the message box
not mail or phone.
Thanks in advance.
 
@bellbell63 It sounds like you want to create a Custom Watchlist Column... Thinkorswim allows us to create up to 19 CWC's... In order to achieve your repeated adjustments you would need to use the deprecated rec, now incorporated into def, to achieve your desired tasks of keeping track of your dynamic data...

You've got 10 years of programming experience on me... I started programming in 1984 when I purchased my first computer, having never touched one before, to write a stock market analysis program of all things...

Hopefully this gets you going... If you need additional help just post your script and we'll help get you going...
 
Last edited:

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

Am new to Thinkscript. I have a study that generates an alert when stock hits hi/low of the day. Have 50 yrs of programming experience but new to Thinkscript. Have written about a dozen so far.

I would like a script that would do the following:
When stock goes up +x% from my average price generate an alert (that I know how to do).
When that happens move the trigger price up another x%. So if my average price is 40 and using 1% when stock hits 40.40 if would get an alert and the new trigger level is 40.40 = + another 1%. It would be acceptable for each trigger to go up 1% from avg price instead of (40x1.01)x1.01x1.01...
And the same on the negative direction (-x%) at each step.
In general how do you make a script run against a watchlist rather than be imbedded in a chart? I would like the above script to watch for x% changes against the "all account positions" or other watchlists. I know this can generate a lot of alerts but they only go to the message box
not mail or phone.
Thanks in advance.

i did a little experimenting with a strategy, but didn't have any luck reading data with getquantity or getaverageprice. i've done it before, i can't find my file.

here is something similar in a chart study to experiment with. it draws lines at different levels
https://usethinkscript.com/threads/...-certain-price-is-breached.14635/#post-124118
 

Similar threads

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

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