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?

PRC is also 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)

    // 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 avatar avatar
Related users ' posts
Iván
1 month ago
cjr30 Simplemente modifica las lineas 19 y 21 por las siguientes: drawtext("▲",barindex,low-0.1*a...
groelandes Gracias!!
WhyAskOZ i copied the code into strategy and it gives error on line 21 and 23. it says " Line 1: ...
jacquesgermain Bonjour non pas de soucis car src=customclose donc dans le menu configuration/propriété me...
geroniman Merci Jacques , indic tres utile. J'ai un indic à programmer avec du price action. es tu dis...
jacquesgermain ok pour regarder ...
Nicolas
11 months ago
f1_maik Ein sehr schöner Indikator, vielen Dank. Wenn ich den Indikator importiere und starte hat d...
Nicolas das ist in der Tat normal, Sie müssen die Auf- und Abwärtsfarbe direkt im Parameterfenster d...
FXtonio Bonjour Nicolas, merci pour cette merveille, je l'utilise en compl2ment du "magical buy sell...
supertiti Bel outil si on ne se tape pas sur les doigts avec ! Comment ajoute-on une image avec le co...
magnus59 Hi Nicolas, thaks for your great work here, I need a scanner for the swedish OMX when ma...
Nicolas Yes, sure please open a new topic in the ProScreener forum section, thank you.
paullyons Hello! Thanks for post your indicators. I'd like you to let me know how to draw lines for ...
Rafa Hi Nicolas! I can´t install this indicator. it installs in a separate window not as an av...
Nicolas Add it on the price, see how: https://www.prorealcode.com/blog/video-tutorials/how-to-add-an...
Frankyslo1 No consigo instalarlo en el precio en PRL-version 10
ChemaGeek Bonjour Nicolas, j'ai récemment découvert cet indicateur (Regularized Momentum 2017) et je l...
YvesRobert Bonjour, nouveau sur PRT (qq jours), j'essaie un peu de voir quel type d'indicateur me convi...
Roland57800 Bonjour Noobywan, si je comprends bien l'utilisation de ce code que je trouve particulièr...
Noobywan Bonjour, quand la question a été posée dans le forum à celui qui avait fait la requête en am...
Fabian This Code draws only a retangle if the condition has been confirmed and NOT before (in that ...
RakeshPoluri I have a question about the bands on the candles. Is it bollinger bands or something else?
Nicolas I think that's 2 Bollinger Bands
Emperor.it "style(line,2)" C'è una guida ai parametri che si possono modificare ? Tipo stile della lin...
IV Mcm https://www.prorealcode.com/programming-with-prorealtime/
fazel53 How do i attach this indicator to my mt5 platform?
Nicolas You can't! All indicators here are for ProRealTime trading platform: https://www.prorealtime...
Nicolas c'est exactement ce que je fais entre les lignes 58 et 64 pour pouvoir tracer la ligne complète
Italo Fabian Nicolas, Ces matrices sont-elles des vecteurs unidimensionnels ou multidimensionnels? Depu...
Denis Bonjour Nicolas et RicLg, Merci Nicolas pour cet indicateur intéressant et merci RicLg pour...
Nicolas Il faut l'ajouter sur le prix avec l'icône de la clé situé en haut à gauche du graphique du ...
jerome777 merci de ta réponse
jerome777 bonjour c est bon il fonctionne parfaitement merci beaucoup
frenqle Hi There.. It seems the TSL stop loss is not working.. it does not respond is that correct?
Ciccarelli Franco Per lasciare che la strategia venga eseguita (dopo aver importato il file): Basta eliminare...
JADINVEST Hello Jan, hello everyone, Thanks Jan for this strategy! Since 2020, have any of you found a...
FXmike hey my friends, thank you for this great code. my problem is he make no trade open. backtest...
FXmike Can i put a Action that my start contract is smaller than 1 ? 0.3 or 0.5 ? In wich Position...
phoentzs I wrote the code for M15 back then and also variants in H1 and M1. Everything works so far....
Ludwig Bonjour Merci pour le code, je souhaite intégrer un break even et mette en place un réinves...
superfalcio hello, this strategy is pretty interesting, anyway on index after diferent suggestion and im...
Fralex Hello everyone I optimized the original “LongOnly-DAX-4H-TMA-Channel” algorithm over a pe...
Alps007 Hi Nicolas. Happy New Year. Can you please program me several MACD divergence screeners ...
Arlei Zanin Hello Nicolas, would it be possible to convert the Cloud to Pascal language? Thank you.
ashee i want it in MT4

Top