How to Easily Code the Mark Minervini Trend Template in Python (2024)

How to Easily Code the Mark Minervini Trend Template in Python (3)

Tired of flicking through stock charts until your eyes cross? Me too.

I have recently been wondering how pros (such as Mark Minervini) narrow down these selections. Obviously trading for them is a full-time job and they’re super experienced, so surely we can leverage some of that experience to save on our valuable time?

Well, with a little basic Python knowhow, it’s actually not too tricky to knock up the “Mark Minervini Trend Template”, and use this as a scanner to filter down to what Mark considers to be the universe of interesting candidates.

Take Tesla as a case study, throughout basically all of 2020 the trend template was satisfied, and huge gains were made. Through 2022, the trend template was not satisfied… and well… we all know how that went down!

Throughout this article we’ll explore:

  • What the trend template is.
  • How you can code it in Python (or… just steal my code!).
  • How you can use it as a scanner.

Enjoy! 🙂

Mark Minervini’s trend template is a rather simple, but elegant 8-part criteria that a stock must have in order for it to be tradable by Mark. These are labelled as non-negotiable criteria, and are as follows:

  1. The current stock price is above both the 150-day (30-week) and the 200-day (40-week) moving average price lines.
  2. The 150-day moving average is above the 200-day moving average.
  3. The 200-day moving average line is trending up for at least 1 month (preferably 4–5 months minimum in most cases).
  4. The 50-day (10-week) moving average is above both the 150-day and 200-day moving averages.
  5. The current stock price is trading above the 50-day moving average.
  6. The current stock price is at least 30 percent…
How to Easily Code the Mark Minervini Trend Template in Python (2024)
Top Articles
Latest Posts
Article information

Author: Greg O'Connell

Last Updated:

Views: 6636

Rating: 4.1 / 5 (42 voted)

Reviews: 89% of readers found this page helpful

Author information

Name: Greg O'Connell

Birthday: 1992-01-10

Address: Suite 517 2436 Jefferey Pass, Shanitaside, UT 27519

Phone: +2614651609714

Job: Education Developer

Hobby: Cooking, Gambling, Pottery, Shooting, Baseball, Singing, Snowboarding

Introduction: My name is Greg O'Connell, I am a delightful, colorful, talented, kind, lively, modern, tender person who loves writing and wants to share my knowledge and understanding with you.