Exit based on percent of profit

Roylow3000

New member
Dozens and dozens of losses after being in the money and I'm ready to throw ToS in the trash if there isn't a more a logical way to lock in profit. How can I create an order strategy to lock in a percentage of profit? For example, if profit is equal or greater than $1,000 then enter an order to lock in 80% or $800 of that. I don't care what the equity cost or the current price, and I'm not trying to do a trailing stop based on a percentage of the stock price itself, but a percentage of my profit. How in the hell is this not a common order type?
 
You would have to do something like this by going to sell order, order rules, conditional order, method, study, edit, thinkscript editor...
(click the tiny gear icon, to the right of "exchange", on the bottom of screen order entry bar)

def EntryPrice = <manual entry>
plot Result = close <= high - ((High - EntryPrice) * .2);

... and set the conditional trigger to True

Obviously, don't just go and copy and paste this, and submit it as a real order. I would suggest learning more about thinkscript and testing the conditional order system in a paper trade environment.

Edit: you may also want to set some sort of minimum threshold so you don't get wiggled out immediately.

plot Result = close <= high - ((High - EntryPrice) * .2) and high >TypePriceHere;

but this is all up to you, it has to be edited manually, per order.
 
Last edited:
@Roylow3000 Sorry to hear that you were/are under the weather... There is never a good time for that... I know you seem unwilling but you should try using a trailing stoploss, whether price or percentage based... Your fixation on 80% of highest profit is what keeps getting you beat up rather than at least working with what is available to avoid suffering until you have the exact solution you desire... A hard stop and a trailingstop would lock in at least some profit...

Let's say your entry was around $56.75 on Friday... A hard stoploss at your choice of price would lock in profit or loss... A trailingstoploss of .5% would start out at a maximum loss of ~$426 at entry and that would reduce as price rises... After GM hit $58.60 it would have triggered and exited at ~$58.30... And considering how GM has an ATR of roughly $0.07 and a 2m average bar movement it is highly unlikely you would have been stopped out before hitting the high... And had you used this scenario you would have stopped out at around 84% of potential profit... It's just math... Not hard to scale to your needs...

This link is a good video on setting up trailingstops...
 
@Joshua It think I referred to that scenario being a viable possibility in one of my earlier posts... It would definitely need to be manually configured and I think I mentioned to set wide and then edit to refine after the entry...
 

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

Similar threads

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

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