2 Qs: 1) can thinkscript indicators automatically pull entry price? 2) Having trouble getting alerts based on price action to work.

bettyjeanbell

New member
Hi, folks. Thanks so much for taking time to consider my questions.

I'm working on completing my first, entirely from scratch indicator and it works great! It's something I've needed for a long time. I'm now adding some features that would make it a LOT easier to use and am running into some issues I could use your help with. 🙏🏼

1) Can thinkscript indicators automatically pull entry price?

My indicator automatically draws stop loss and profit taking lines above and below the entry price of my trade. Currently, I have to manually enter my entry price into the indicator at the start of each trade. It's fine, but takes valuable time.

Is there a way to code an indicator to automatically pull the entry price of the trade I'm currently in? If so, could you please share an example of that code with me? Thank you so, so much. 🙏🏼

2) Having trouble getting alerts based on price action to work.

A bonus feature is that I wanted to trigger alerts to sound when price action crosses these percentage lines, live in real time. Currently, I can get the alerts to sound but not based on the price action. Here's the code related to the alerts... would love your help getting this to work. Thank you endlessly for any recommendations or suggestions.

input PriceType = PriceType.LAST;

def LastPrice = close(priceType = priceType);

Alert(LastPrice <= OpeningStop, "Stopped Out, Opening Stop", Alert.Bar, Sound.Bell);
Alert(LastPrice >= PT10, "At 10%, move stop up to BE", Alert.Bar, Sound.Ring);

Thanks so much for your help and expertise. 🙏🏼
 
Solution
Hi, folks. Thanks so much for taking time to consider my questions.

I'm working on completing my first, entirely from scratch indicator and it works great! It's something I've needed for a long time. I'm now adding some features that would make it a LOT easier to use and am running into some issues I could use your help with. 🙏🏼

1) Can thinkscript indicators automatically pull entry price?

My indicator automatically draws stop loss and profit taking lines above and below the entry price of my trade. Currently, I have to manually enter my entry price into the indicator at the start of each trade. It's fine, but takes valuable time.

Is there a way to code an indicator to automatically pull the entry price of the trade I'm...

MerryDay

Administrative
Staff member
Staff
VIP
Lifetime
Hi, folks. Thanks so much for taking time to consider my questions.

I'm working on completing my first, entirely from scratch indicator and it works great! It's something I've needed for a long time. I'm now adding some features that would make it a LOT easier to use and am running into some issues I could use your help with. 🙏🏼

1) Can thinkscript indicators automatically pull entry price?

My indicator automatically draws stop loss and profit taking lines above and below the entry price of my trade. Currently, I have to manually enter my entry price into the indicator at the start of each trade. It's fine, but takes valuable time.

Is there a way to code an indicator to automatically pull the entry price of the trade I'm currently in? If so, could you please share an example of that code with me? Thank you so, so much. 🙏🏼

2) Having trouble getting alerts based on price action to work.

A bonus feature is that I wanted to trigger alerts to sound when price action crosses these percentage lines, live in real time. Currently, I can get the alerts to sound but not based on the price action. Here's the code related to the alerts... would love your help getting this to work. Thank you endlessly for any recommendations or suggestions.

input PriceType = PriceType.LAST;

def LastPrice = close(priceType = priceType);

Alert(LastPrice <= OpeningStop, "Stopped Out, Opening Stop", Alert.Bar, Sound.Bell);
Alert(LastPrice >= PT10, "At 10%, move stop up to BE", Alert.Bar, Sound.Ring);

Thanks so much for your help and expertise. 🙏🏼
https://usethinkscript.com/threads/portfolio-functions-in-thinkorswim.11485/
https://usethinkscript.com/threads/...quities-in-thinkorswim.7089/page-9#post-87587
an example:
https://usethinkscript.com/threads/...quities-in-thinkorswim.7089/page-9#post-84253
 
Solution

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.
Top