Can someone please add entry areas into this for me

EddieM

New member
Plus
How can I turn this into entry areas in the settings so I can change the %s to what ever I want at any time in the settings pop up?.
I think many others would like this as well to make it more easy to use.

So I can change each of the % areas in the setting area that it dose not have right now for each of the %s.
5% Stop, 5% Target, 10% Target, 15% Target

Here is the code that was posted into this group here .
https://usethinkscript.com/threads/...owned-equities-in-thinkorswim.7089/post-67202

See screen grab at bottom it shows the settings area dose not have the % areas to set in it. I would like them to be added in so they can be changed as needed easy.

Code:
# Average Actual Entry
# Mobius
# 01.01.2018

# Removed portions of Mobius' code, added quantity and replaced Mobius' P/L
# calculation with GetOpenPL().
# Color-coded label, edited study look/colors for personal preference

input use_line_limits = yes;#Yes, plots line from/to; No, plot line across entire chart
input linefrom = 100;#Hint linefrom: limits how far line plots in candle area
input lineto = 12;#Hint lineto: limits how far into expansion the line will plot

def PL = GetOpenPL();
def c = if isNaN(close[-1]) then close else c[1];
def Entry = if isNaN(GetAveragePrice()) then Entry[1] else GetAveragePrice();
def LastEntryBar = if Entry != Entry[1] then barNumber() else LastEntryBar[1];

plot Entry_ = if barNumber() >= HighestAll(LastEntryBar) and Entry > 0
then highestAll(if isNaN(close[-1]) then Entry else double.nan) else double.nan;
Entry_.SetStyle(Curve.SHORT_DASH);
Entry_.SetLineWeight(3);
Entry_.SetDefaultColor(color.BLUE);
Entry_.HideBubble();
Entry_.HideTitle();

AddLabel(1," P/L: " + AsDollars(PL) +" ",
if PL == 0 then color.cyan
else if PL > 0 then color.green
else color.red);

plot "5% Stop" = if Entry_ then Entry_ - .05*Entry else double.nan;
"5% Stop".SetDefaultColor(color.red);

plot "5% Target" = if Entry_ then Entry_ + .05*Entry else double.nan;
"5% Target".SetDefaultColor(color.green);

plot "10% Target" = if Entry_ then Entry_ + .10*Entry else double.nan;
"10% Target".SetDefaultColor(color.Yellow);

plot "15% Target" = if Entry_ then Entry_ + .15*Entry else double.nan;
"15% Target".SetDefaultColor(color.Magenta);

plot "20% Target" = if Entry_ then Entry_ + .20*Entry else double.nan;
"20% Target".SetDefaultColor(color.red);
# end code
Screenshot 2024-10-07 at 10.19.22 PM.png
 
Last edited by a moderator:

Similar threads

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

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