• Products
  • Community
  • Markets
  • Brokers
  • More
Get started
  • Community
  • /
  • /Information

Information

[Strategy] - EMA 10,20 59 with Profit DisplayedThis EA is still under construction !! So for this EA is only based on the trend of the 3 EMA's Buytrend = (ema1 and ema2 > ema3) and (ema1 and ema2 > ema3 ) We also change the Background depending on the trend. bgcolor(Buytrend ? color.green : color.red,transp=70) At this point I was wondering how much "profit" we would have made if this strategy was only based on the trend so I added the Labels to start/end close of that trend and then see how much profit in pip's we would have made. Later I was wondering if I could get the total information on the trades and thats what the Label over the current candle is telling us. If that label is red we didn't made any profit and if its green we made som profit. I also added a BuyProfit and a count buy/sells and a total Profit to see how that information clearly without opening the strategy tester. NOTE this shows the profit in pip's Next step is to implement a Buy/Sell Signal togheter with a Buy/SellSignalOUT signal. Thats currently under development and you'll see some code being there already but as of now the orders are made from the trend signal not the Buy/Sell Signal.
Pine Script® strategy
by mattehalen
Jun 6, 2020
33

Select market data provided by ICE Data services. Select reference data provided by FactSet. Copyright © 2025 FactSet Research Systems Inc.© 2025 TradingView, Inc.

More than a product
  • Supercharts
Screeners
  • Stocks
  • ETFs
  • Bonds
  • Crypto coins
  • Crypto pairs
  • CEX pairs
  • DEX pairs
  • Pine
Heatmaps
  • Stocks
  • ETFs
  • Crypto
Calendars
  • Economic
  • Earnings
  • Dividends
More products
  • Yield curves
  • Options
  • News Flow
  • Pine Script®
Apps
  • Mobile
  • Desktop
Community
  • Social network
  • Wall of Love
  • Refer a friend
  • House Rules
  • Moderators
Ideas
  • Trading
  • Education
  • Editors' picks
Pine Script
  • Indicators & strategies
  • Wizards
  • Freelancers
Tools & subscriptions
  • Features
  • Pricing
  • Market data
Special offers
  • CME Group futures
  • Eurex futures
  • US stocks bundle
About company
  • Who we are
  • Manifesto
  • Athletes
  • Blog
  • Careers
  • Media kit
Merch
  • TradingView store
  • Tarot cards for traders
  • The C63 TradeTime
Policies & security
  • Terms of Use
  • Disclaimer
  • Privacy Policy
  • Cookies Policy
  • Accessibility Statement
  • Security vulnerability
  • Status page
Business solutions
  • Widgets
  • Charting libraries
  • Lightweight Charts™
  • Advanced Charts
  • Trading Platform
Growth opportunities
  • Advertising
  • Brokerage integration
  • Partner program
  • Education program
Community
  • Social network
  • Wall of Love
  • Refer a friend
  • House Rules
  • Moderators
Ideas
  • Trading
  • Education
  • Editors' picks
Pine Script
  • Indicators & strategies
  • Wizards
  • Freelancers
Business solutions
  • Widgets
  • Charting libraries
  • Lightweight Charts™
  • Advanced Charts
  • Trading Platform
Growth opportunities
  • Advertising
  • Brokerage integration
  • Partner program
  • Education program
Look FirstLook First