Multi Target Profits

ysanchezmd

New member
VIP
Hi,

I am trying to develop a code for an strategy with multiple targets where each sum of the target account for the total profit; example if price reach target 1, then target2 and finally target 3 I can count each as a profit in a sum will give the total profit.

Same with Breakeven where Breakeven do not count as a loss neither a profit.

Thank you in advance;
 
Hi,

I am trying to develop a code for an strategy with multiple targets where each sum of the target account for the total profit; example if price reach target 1, then target2 and finally target 3 I can count each as a profit in a sum will give the total profit.

Same with Breakeven where Breakeven do not count as a loss neither a profit.

Thank you in advance;

that is very vague, can you elaborate, i am not sure what you are asking for?
i don't know what a sum of target means?

what are the rules and conditions, for buying, selling, aborting?
are you buying all the desired shares on the initial buy signal?
are you buying more at a target? or selling some at a target level? how much?
what rules determine when to sell? what if price drops? or goes flat for 30 bars?
what happens if price doesn't reach a target? after how many bars do you abort and reset things and sell, for a loss?


make an outline with 3 sections,
buy, sell, abort,
and list every possible condition and the rules to follow


or think of it this way,
where do you want to see something? chart
what do you want to see?
when do you want to see it?


this would be a way to start,

when a buy happens, the close price could be saved like this,
def buy = ... some condition
def buy_price = if barnumber() == 1 then 0 else if buy then close else buy_price[1];

#then buy_price can be referenced and targets and stops calculated from it.
input target1_percent = 0.5;
plot target1 = if buy_price > 0 then buy_price * (1+ (target1_percent/100)) else double.nan;
 

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

Hi,

I am trying to develop a code for an strategy with multiple targets where each sum of the target account for the total profit; example if price reach target 1, then target2 and finally target 3 I can count each as a profit in a sum will give the total profit.

Same with Breakeven where Breakeven do not count as a loss neither a profit.

Thank you in advance;

some studies that could be a starting point,
https://usethinkscript.com/threads/trade-lines-for-thinkorswim.16564/
https://usethinkscript.com/threads/...levels-until-price-breaks-these-levels.16916/
https://usethinkscript.com/threads/...-certain-price-is-breached.14635/#post-124118

https://usethinkscript.com/threads/risk-and-reward-box.14950/
 
Thank you a lot;

All of the indicators suggested will help and I am glad you share them with me.
Still I want the strategy to be able to count as a winner the highest target reached;

Example for Long:

Entry = will be a buy signal
Hard stop = will be entry long minus ATR* multiplier
Trailing Stop = will be ATR trailing
Targe 1 = will be entry long + ATR *multiplier 1( this I want to be the Breakeven, meaning I would like to use the same multiplier used for the Hard Stop)
Traget 2 = will be entry long + ATR* Multiplier2 ( can 2 or 3 times the risk used for hard stop calculation)
Target 3= will be entry long + ATR * multiplier3 ( can be 4 or 5 times the risk used for hard stop calculation)

Now is Long condition is met I will like to exit at:

Target = will be the highest target reached ( condition to, if Highest target reached is Target3 do not count Target 1 and Target 2, or if only Target 1 is reached do not count Target 2 and Target 3)
Stop = will be either Hard stop or Trailing stop

For Win Rate I would like to count number of :

Winners = target met( just one that is the highest reached)
Losers = target not met and Hard Stop or Trailing Stop reached

For Profit and Loss:

Sum of all Highest Target met minus sum of all Stop reached

Again thank you in advance for your help;

Happy Week trading!
 

Similar threads

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

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