How do I add a label with price?

JBTrades

New member
Hi Guys, when I'm trading I use Active Trader to buy and sell immediately, because of this I don't know the exact price I enter a trade at. Would it be possible to create a label that has the price I entered a trade at? Green for long and Red for short? Any help is appreciated.
 

Branch

Member
VIP
Hi Guys, when I'm trading I use Active Trader to buy and sell immediately, because of this I don't know the exact price I enter a trade at. Would it be possible to create a label that has the price I entered a trade at? Green for long and Red for short? Any help is appreciated.

Code:
# Branch Investment Group (BIG)

#wizard input: length1
#wizard text: -period
#wizard input: averageType1
#wizard text: crosses
#wizard input: crossingType
#wizard input: length2
#wizard text: -text
#wizard input: averageType2
#wizard text: GC
#wizard input: price


input price = Ohlc4;
input length1 = 4;
input length2 = 100;
input averageType1 = AverageType.SIMPLE;
input averageType2 = AverageType.SIMPLE;
input crossingType = {default above, below};

def avg1 = MovingAverage(averageType1, price, length1);
def avg2 = MovingAverage(averageType2, price, length2);


AddLabel (yes, if Price > avg2 then "BULL" + "" else "" , Color.LIGHT_GREEN);
AddLabel (yes, if Price < avg2 then "BEAR" + "" else "" , Color.RED);
 

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