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 • 227 days ago #

    I added a simple momentum indicator (MACD). I think much better results:

     

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

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

    // ACHAT
    ca1 = close[1] < TMA8 and close > TMA8
    ca2 = EMA5 > TMA8

    IF ca1 and ca2 AND MACD12M>MACD12S AND MACD12M[1]>MACD12S[1] THEN
    achat = 1
    ENDIF

    // VENTE
    cv1 = close[1] > TMA8 and close < TMA8
    cv2 = EMA5 < TMA8

    IF cv1 and cv2 AND MACD12M<MACD12S AND MACD12M[1]<MACD12S[1] THEN
    vente = -1
    ENDIF

    return achat as “ACHAT”, vente as “VENTE”

     

    happy New Year !!!

  2. gianlox • 227 days ago #
    achat = 0
    vente = 0
    MACD12M = MACDline[12,26,9](close)
    MACD12S = ExponentialAverage[9](MACD12M)
    
    
    // INDICATEURS
    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
    ENDIF
    
    // 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
    ENDIF
    
    return achat as "ACHAT", vente as "VENTE"
    

     

avatar
Register or

Likes

avatar avatar avatar avatar avatar avatar
Related users ' posts
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
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...
Pietro Fontana Hi Wings, i did not found a forum thread for this interesting system so i post my comment he...
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...
supertiti Il manque 2 slash devant len dans le code dur car la variable ne marche pas bonne journée
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
Raspoutine Hi Nicolas,The results are not identical   ma200 = Arevage(200) //c4 = summation[2...
Magela01 is this ok with AMibroker?
Nicolas Prorealcode is a website about prorealtime trading platform programming, this code will not ...
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...
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. 
Sofitech Ce code n'est valable que sur la V10.3 ? sur le 10.2 il y a une erreur de syntaxe dans le fi...
Nicolas Oui en effet, c'est un indicateur "10.3" à cause uniquement de la mise en forme des courbes ...
piarou Objet : PRC_QEMA | indicator Bonjour, Bizarrement : • les deux paramètres sont en remarqu...
Nicolas En effet, c'est le cas si on copie/colle le code. Ces 2 variables sont inscrites en externes...
Nicolas
8 months ago
Holt EMA
Holt EMA
1
Indicators
robertanthonyuk Hi,What do the each colour represent? Rob
David Nicolas I've looked at it again and there's a problem.  As an example here's a simple cross...
Nicolas You'll need to preload bars to get the good calculations of you indicators. I did not test i...
David Nicolas I tried DEFPARAM Preloadbars = 5000 And still the same drawn output of entries/exit...
morgiza Thank you Nicolas. The Sharescope MA is also meant to be Variable (CMO) Moving Average. The ...
Nicolas This formula has nothing to deal with the indicator of this post :) I can translate it for s...
morgiza Thank you very much! Request submitted.Paul
Nicolas
8 months ago
Nicolas Because of no data available at the start of calculations. Add this at line 15 : if barindex...
srajtri Hi Nicolas, thanks for your updates and am very new in trading would you guide me to back t...
Nicolas Please post any question on forums, thanks.
luigi Ciao Nicolas. Approfitto di questo spazio per chiederti se puoi aiutarmi. Avrei bisogno di u...
Nicolas Si prega di utilizzare i forum per chiedere richieste di codice per favore.
Wilko Hi Nicolas!, Thanks for providing code for the FRAMA! If I have understood correctly, one s...
triss1965@gmail.com HELP, WHY DONT I NOT GOT THE INDICATOR IN CHART. JUST UNDER?????????????
Nicolas Use the wrench on the upper left side of your price chart to add correctly indicator on PRICE.

Top