EMA5 – TMA8 trading signals

EMA5 – TMA8 trading signals

Hi all,

Here is a simple code asked by one of my website user.

We have a BUY signal (green) if :

  • the exponential average 5 (close) > the triangular average 8 (close)
  • close > triangular average 8 but close of the previous candle < triangular average 8

Of course, we have a SELL signal (red) for the inverted conditions.

Don’t forget to set “achat” and “vente” to Histogram, and to set the colors.

I also added a blue line with value “0”.

The EMA5 is in red, the TMA8 is in blue.

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. gianlox • 08/23/2016 #

    I added a simple momentum indicator (MACD). I think much better results:
    achat = 0vente = 0MACD12M = MACDline[12,26,9](close)MACD12S = ExponentialAverage[9](MACD12M)
    // INDICATEURSEMA5 = ExponentialAverage[5](close)TMA8 = TriangularAverage[8](close)
    // ACHATca1 = close[1] < TMA8 and close > TMA8ca2 = EMA5 > TMA8
    IF ca1 and ca2 AND MACD12M>MACD12S AND MACD12M[1]>MACD12S[1] THENachat = 1ENDIF
    // VENTEcv1 = close[1] > TMA8 and close < TMA8cv2 = EMA5 < TMA8
    IF cv1 and cv2 AND MACD12M<MACD12S AND MACD12M[1]<MACD12S[1] THENvente = -1ENDIF
    return achat as “ACHAT”, vente as “VENTE”
    happy New Year !!!

  2. gianlox • 08/23/2016 #

    achat = 0
    vente = 0
    MACD12M = MACDline[12,26,9](close)
    MACD12S = ExponentialAverage[9](MACD12M)

    EMA5 = ExponentialAverage[5](close)
    TMA8 = TriangularAverage[8](close)

    // ACHAT
    ca1 = close[1] < TMA8 and close > TMA8
    ca2 = EMA5 > TMA8
    ca3 = MACD12M>MACD12S AND MACD12M[1]>MACD12S[1]

    IF ca1 and ca2 AND ca3 THEN
    achat = 1

    // VENTE
    cv1 = close[1] > TMA8 and close < TMA8
    cv2 = EMA5 < TMA8
    cv3 = MACD12M<MACD12S AND MACD12M[1]<MACD12S[1]
    IF cv1 and cv2 AND cv3 THEN
    vente = -1

    return achat as \"ACHAT\", vente as \"VENTE\"


Register or


avatar avatar avatar avatar avatar avatar
Related users ' posts
Daniel da Costa Thanks Doc! Where can you find a service for Dax with a 1 point spread?
Doctrading Hello. I suggest you : ProRealTime CFD, or IG. Best regards,
swapping merci gabri, on va le mettre à l'essai ;)
Toto le Heros Tx Nicolas. Looks very interresting. No text display on my charts. Any specific option to ti...
Nicolas Be sure to have these settings set with these values: //edblHigh1 = 0.04 //edblLow1 = -0....
Toto le Heros Ok, got it ! Great ! Tx
Genotik Merci de votre contribution !
Leo Hi all, I posted a new version of this indicator ( I just add arrows to spot the local maxi...
Trading_En_El_Ibex35 Muchas Gracias por compartir este interesante indicador. Un saludo
JM David, Thanks a lot and next week I begin the test of this strategy in real... You have ot...
rejo007 hello david, i'll try it could you tell me wich strategy do you use in real? thanks
David Somogyi Hello, I have a couple of DAX strategies of breakout and mean reversion. I'll try to post...
Thomas007 Is there any way to build something similar for FX? I wonder what would be the replacement f...
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 I do not run this strategy myself, currently. As for why it is not taking trades live: Do yo...
dkinse Hey, Yes it´s running in 30 m timeframe. I had it running and it made two trads in januar...
Wing There's a few threads on the forum about backtest and live trades being different at times. ...
juanj I mean a moving average line
juanj I coded the above indicator into a strategy, seems to be profitable on the EURUSD 1Hr
Leo I just have a question about trading. What is better for use as a filter in trading (long)...
David Balance thanks for sharing this excellent indicator.  Here are some thoughts.  please ad...
supertiti Il manque 2 slash devant len dans le code dur car la variable ne marche pas bonne journée
Alexandre AMARY Bonjour, Je ne comprends pas pourquoi les bougies rouges n'ont jamais de mèche basse, contr...
Alexandre AMARY Pardon... "contrairement aux bougies bleues"
Nicolas En effet, déjà discuté et modifié dans ce topic: https://www.prorealcode.com/topic/heiken-as...
gabri Great screener!! I would like to add only the fact that Minervini is a growth investor and s...
Hayden Hi Nicolas, thanks for the Minervini screener, I'm finding it really useful. I am a big fan...
Nicolas Private personal assistance is possible through the programming services. Otherwise, you cou...
gabri Paulon, you are right, I used the variable b in too many places :) Try to change the follo...
Leo Hi Gabri, have you ever try this in a trading system?
gabri Leo, I used to crosscheck this indicator a long time ago. For the trading I was doing at tha...
David Somogyi Hello, 180º profit booster from Greg Secker. Regards,
lizmerrill david, THANKS FOR THE REPLY, IN YOUR CODE BELOW: FDI=0 HH = highest[N](close) LL = lo...
David Somogyi Hello, This is merely a filter indicator for measuring high fractality, which helps to av...
Nicolas Il faut utiliser backgroundcolor, bon courage. 
leyoy Quelqu'un sait s'il est possible de faire apparaitre une flèche paramétrable au changement d...
Nicolas Oui je sais que c'est possible :/