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.
achat = 0
vente = 0

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

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

IF ca1 and ca2 THEN
achat = 1
ENDIF

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

IF cv1 and cv2 THEN
vente = -1
ENDIF

return achat as "ACHAT", vente as "VENTE"
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 • 112 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 • 112 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
Related users ' posts
Nicolas Any group of shares you like!
mal Hi Nicolas, whar for a broker do you use for Future-Tarading with pro real time?
Nicolas Prorealtime trading with interactive broker, more information follow this link: https://trad...
Stenozar Hi Nicolas, does it work with DAX? which indicator you prefer to trade Dax? thanks a lot fo...
Riccardo Benedetti Thanks a lot nicolas for this indicator. good job. I love the great work done simple. Thanks...
Riccardo Benedetti ciao nicolas mi piacerebbe provare a fare un backest di una strategia con questo indicatore ...
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
4 months ago
Holt EMA
Holt EMA
0
Indicators
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...
Ernesto1 J'ai essayé avec deux différents I ,  a =  3 périodes et un 3 x 5 = 15 périodes.Ie comme si ...
Wilko Nicolas, anytime I have an idea, I just search for it on ProRealCode and usually you have do...
Nicolas Of course! please add a query in probuilder forum and we'll work together on this indicator ...
Nicolas
4 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.
bluetime6 Hello Doctrading.   Can you ask you for something? Can you code a screener screen po...
IGOSNELL Thanks but unfortunately can't read German. If you can show that your strategies can work on...
Nicolas Thank you for contribution. Please consider that advertising is tolerate as long as you cont...
triss1965@gmail.com  Hi, I cant make it work. And if you doing so much money. Why do you have to sell it? It don...
finplus Bonsoir, j'ai de nouveau aujourd'hui lancé la stratégie en réel sur mon compte IG sur la pai...
AleX 0 improvments, I tried a lot of modified version but no one was working. I think that only w...
Fabio Anthony Terrenzio this strategy works only in a well defined trend
Nicolas Ok Doc, beware of intraday, it's a battlefield full of random noises :) Maybe we can work to...
phili711 Bonjour Si la moyenne 100 est au dessus de la moyenne 20 le trend est baissier zlors pourqu...
Nicolas La comparaison se fait entre la valeur de la moyenne actuelle et telle qu'elle était il y a ...
Ermitage Hello please have you got the opportunity to modify code in order to obtain a centered simp...

Top