Trend Template by Mark Minervini

Trend Template by Mark Minervini

The Trend Template stock screener is a set of selection criteria by Market Wizard Mark Minervini. Here are the rules:

  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 above its 52-week low. (Many of the best selections will be 100 percent, 300 percent, or greater above their 52-week low before they emerge from a solid consolidation period and mount a large scale advance.)
  7. The current stock price is within at least 25 percent of its 52-week high (the closer to a new high the better).


Share this

Risk disclosure:

No information on this site is investment advice or a solicitation to buy or sell any financial instrument. Past performance is not indicative of future results. Trading may expose you to risk of loss greater than your deposits and is only suitable for experienced investors who have sufficient financial means to bear such risk.

ProRealTime ITF files and other attachments : How to import ITF files into ProRealTime platform?

New! PRC is also now on YouTube, subscribe to our channel for exclusive content and tutorials

  1. Djfromsweden • 104 days ago #

    Hello Nicolas! I wonder if you would like to help me.  I have a very good (and simple) signal (formation) that I am trying to program in the market scanner, but I must be doing something wrong.

    It has a hitrate of 82% (very big backtesting in Multicharts) , so very useful, and I am sure that you will like it, if you try it.

    I Think for someone as  proffesional as you in programming, you could help me out in 1-2 minutes or so. Would you like to try? If yes, Maybe we can make a screensharing, and I can show explain

    what a I mean. I have teamviewer.  If yes, maybe you can start sending me in e-mail

    I would appreciate your help.  🙂

    • Nicolas • 104 days ago #

      Sure, please send me a message through the programming services form, we’ll see together how I can help you the best way. Thanks.

  2. luckyhaa • 104 days ago #

    thanks Nicolas, this is what i am looking long time !!!!

  3. Stenozar • 104 days ago #

    Hi Nicolas, it’s very interesting. Do I have to apply it to any particular list?



    • Nicolas • 104 days ago #

      Any group of shares you like!

  4. mal • 101 days ago #

    Hi Nicolas,

    whar for a broker do you use for Future-Tarading with pro real time?

  5. Stenozar • 93 days ago #

    Buon pomeriggio Nicolas, sono riuscito ad importare lo screener ma non mi evidenzia alcun titolo, mi riporta solo tutta la lista dei titoli azionari. Come dovrebbe essere visualizzato il titolo selezionato dallo screener? in modo evidenziato o come per distinguerlo? Grazie!

    • Nicolas • 93 days ago #

      Sì, potrebbe visualizzare molte scorte nella finestra dei risultati. È un “template” per trovare le scorte di tendenza.

  6. Frank Wilson • 81 days ago #

    thanks for the screener mate cheers

  7. Merls • 74 days ago #

    Hi Nicholas, Is it possible to add the Mansfield RS criteria in also? I have been trying to put that into my screener. 
    Also, can ‘resources’ companies be excluded easily in the screener?

    Cheers Merls

  8. Onythan • 62 days ago #

    Hello Nicolas,

    Thanks for this screener. I was wondering if I could add a criteria in order to get the whole list in this screener ? Cause PRT is only displaying 50 results at once.



  9. Raspoutine • 33 days ago #

    Hi Nicolas,

    The results are not identical


    ma200 = Arevage(200)
    //c4 = summation[20](ma200 > ma200[1]) = 20
    c4 = summation[20](Average[200] > Average[200](1)) = 20


    My interpretation:

    // Trend Template by Mark Minervini Opti ?
    ma50 = Average[50] 
    ma150 = Average[150] 
    ma200 = Average[200] 
    c1 = Close > ma200 
    c2 = Close > ma150 
    c3 = ma150 > ma200
    //c4 = summation[20](Average[200] > Average[200](1)) = 20 
    c4 = ma200/ma200[25] > 0.025
    c5 = ma50 > ma200 
    c6 = ma50 > ma150 
    c7 = Close > ma50
    c8 = Close / Lowest[252](low) > 1.3 //dochian
    c9 = Close / Highest[252](high) > 0.75 //dochian
    IF c1 AND c2 AND c3 AND c4 AND c5 AND c6 AND c7 AND c8 AND c9 THEN
     Trend = 1
     Trend = 0
    Return Trend



    Earlier in the thread, cfro mentioned :

    LO, Andrew W. and HASANHODZIC, Jasmina (2010) The Heretics of Finance : Conversations with Leading Practitioners of Technical Analysis. (New York : Bloomberg).

    There is a great chapter in the book comprising an interview with Stan Weinstein. It offers some terrific insights relevant to the Stage 2”. Among these are the following :

    • Weinstein explains that he does in fact base his trading on the use of three moving averages : 50-day, 150-day and 200-day : exactly as described by Minervini. This was not revealed in his book Secrets for Profiting in Bull and Bear Markets. Perhaps he just wanted to keep it as simple as possible in the book by only referencing the 150-day MA.

    • What I think is potentially the most important new point : Weinstein goes on to explain how he uses the three moving averages as a mechanical exit rule, which he says he never ever deviates from.

    • If price falls below the 50-day MA he will sell one third of his position, unquestionably – as risk management.

    • If price rises back above the 50-day MA, he will consider buying back the third he sold (but would not necessarily do so). 

    • However, if price continues to weaken and goes below the 150-day MA he will sell another third.

    • Finally, if price falls below the 200-day MA he exits the remainder of his position.

    Essentially, while he does not say it in exactly these words, Weinstein believes that any volatility that occurs while the price remains above its 50-day MA, is volatility to ignore’. However, if the 50-day MA is breached : start to use the rules described above.

    Not mentioned by Weinstein, a further warning signal” that could/should demand defensive action, is when the 50-day MA crosses below the 150-day MA.

    A mantra of Weinstein and so many other gurus is KEEP YOUR LOSSES SMALL !

    Weinstein’s system seems a sound one for helping to do this. The thread has offered insights from both Weinstein and Minervini on when to BUY Stage 2 stocks.

    Weinstein’s system offers objective criteria for when to SELL, which is often one of the hardest investment decisions to make.

    We all know we should run our winners. While the 50-day, 150-day and 200-day moving averages are all rising and all in the correct traffic light” order, and last but not least, price remains above all three moving averages : the technicals, according to Weinstein, say : stay in the stock”.


    Enjoy ^^



  10. Magela01 • 25 days ago #

    is this ok with AMibroker?

    • Nicolas • 25 days ago #

      Prorealcode is a website about prorealtime trading platform programming, this code will not work in any other software 🙂

Register or


avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar
Related users ' posts
gabri Franz, can this code work for you? count=1 i=0 j=i+1 tot=0 //calcolo 3 barre while co...
Francesco78 Hi, can you show at least one strategy that works well with this indicator? The idea is nic...
gabri Francesco, I just tried to code an idea from Maximus 78 (
manel Hi - have come across a difference here in the calculation of the indicator. It's meant to r...
Nicolas I don't know, the code of this indicator is one from another platform, not the Three Line Br...
manel Ok, many thanks. I've tried messing around with the code myself but am no closer to solving ...
gabri GraHaL, I cannot see any link attached. I mostly manual trade but for stocks with strong fi...
GraHal Yes sorry, I set up a link to a screen shot on my google drive and then I got locked into th...
gabri Here's the thread
supertiti Felicidades Laurenzo d'avoir pris le temps pour ce gros travail et en plus dans l'esprit du ...
gatarayihajp Hello,  It's very interesting indicator. Could you explain more about it? Thank a lot
Wing The system trades 1 to 3 contracts, and 5 under extreme circumstances. If trading the DAX 1 ...
Stefanb Wing Can i find you on Twitter?
Toto le Heros Hi Wing, Your code looks quite interresting. I was wondering if you could develop a bit mo...
Tedvin Nice one, thanks a lot Maz :)
victormork Thanks Man!!
MtraderWD40 Many thanks for sharing this, simple but a great indicator. Used it successfully for visual ...
David Balance thanks for sharing this excellent indicator.  Here are some thoughts.  please ad...
reb Hello Marc your strat seems very intersting, will take a look Reb
897148 What exactly is meant by Total price? Is r1 =28 in your example the no of days for "Total P...
otty82  THX looks good!
century nice one , thank you
supertiti Il manque 2 slash devant len dans le code dur car la variable ne marche pas bonne journée
juanj Also change the ATR multiplier to 2 instead of 3. Slightly better drawdown.
GraHal I started he thread below as I get the results shown on image below. Please help on the Foru...
imokdesign Hi Everybody, when I look at the strategy I felt the need to implement a Moneymanagement-Sy...
Marius Hi Nicolas,   thanks you for you valuable input. I am relatively news to PRT and I wo...
Nicolas This is question that should be posted on forum, it's general purpose and it is not related ...
Frankiesc Thanks Nicolas for sharing this indicator, it's interesting
ade1 Hullo Nicolas, when i put the indicator on my chart ,it comes as an indicator below the cha...
Nicolas Apply it on price instead with the wrench on the upper left side of the price chart.
ade1 thankyou
gabri Kris, let me know which color you want to use. The lines to change are the 22,23,24.
paulon Hi Gabri.  Very interesting indicator.  I changed the colours to if v>=v[1] thenr=0g=255b...
gabri Paulon, you are right, I used the variable b in too many places :) Try to change the follo...
JohnVS okay thanks, Hopefully u had a chance to check the other question too? Since the stock hav...
Nicolas I'm pretty sure you can do it yourself John! Please don't be shy :)
century thanks for this work , quite interesting but i would like the same thing as JohnVS , ;)
supertiti amplitude 1.2.3  = ( 2-6-30 ) or (1-1-27) ?
LUCASSEN Hallo Supertiti Macd amplitude=1-1-27    and    prc halftrend triple in Heikin Ashi  grafie...
supertiti Thanks you so much Lucassen
barbagio  Hola David, estaba mirando tu trading system y me preguntaba si ya lo habias probado en un ...
David Somogyi Hola Giovanni, Solo lo he probado en libra dólar vs USD, en demás divisas no funciona con e...
David Somogyi Hola Giovanni, Solo lo he probado en libra vs USD, en demás divisas no funciona con esos pa...
TheAccountant Bonjour et merci pour cet indicateur. j'essai de parametrer une alerte sur le changement de...
leyoy Salut Nicolas, est-ce compliqué de faire varier le fond de PRT en fonction de la couleur de...
Nicolas Il faut utiliser backgroundcolor, bon courage.