Indicator “Candle & TMA8 open”

Indicator “Candle & TMA8 open”
Hi all, Here is an indicator coded for one of the readers of my website. We BUY if :
  • bullish candle (close > open)
  • close and open > triangular moving average 8, applied to open
  • lowest of the candle < TMA8 with at least 1 pip below the TMA8
  • size of the inferior shadow  > size of the body
  • size of the upper shadow <= 2 pips
  • no doji : size of the body >= 3 pips
Of course, we SELL for opposite conditions. So here is the code :
achat = 0
vente = 0

TMA8 = TriangularAverage[8](open)

ca1 = close > TMA8 and open > TMA8 and close > open
ca2 = low < TMA8
ca3 = (open - low) > (close - open)
ca4 = high - close <= 2 * pipsize
ca5 = close - open >= 3 * pipsize

cv1 = close < TMA8 and open < TMA8 and close < open
cv2 = high > TMA8
cv3 = (high - open) > (open - close)
cv4 = close - low <= 2 * pipsize
cv5 = open - close >= 3 * pipsize

IF ca1 and ca2 and ca3 and ca4 and ca5 THEN
achat = 1
ELSIF cv1 and cv2 and cv3 and cv4 and cv5 THEN
vente = -1

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

Register or


avatar avatar
Related users ' posts
3 weeks ago
Holt EMA
Holt EMA
Nicolas Thanks a lot, a lot of people will find it useful! About customclose of the daily OHLC, you...
supertiti Voici un code de VIDYA construit par Sohocool : // MOYENNE EXPONENTIELLE ADAPTIVE VIDYA by ...
Matriciel Merci Supertiti. Je trouve que ce code est difficile à règler et n'est pas d'une grande pré...
Ernesto1 J'ai essayé avec deux différents I ,  a =  3 périodes et un 3 x 5 = 15 périodes.Ie comme si ...
SoloContado Hello Nicolas,   thanks a lot for your many contributions in this post. I have a prob...
Nicolas Because of no data available at the start of calculations. Add this at line 15 : if barindex...
century hi i will use it to see ... and get back to tell ya
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.
Nicolas This indicator is only compatible with Prorealtime 10.3
kajsy88 I'm using prorealtime suplied by ig markets so that's potentially why then !
davidspain It would be possible to use this screener at the same time than the recent one about high vo... 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.
gianlox I added a simple momentum indicator (MACD). I think much better results:   achat = 0v...
gianlox achat = 0 vente = 0 MACD12M = MACDline[12,26,9](close) MACD12S = ExponentialAverage[9](MA...
Somatolysis   Hi IGOSNELL, you´ll find other of my strategies here - but without the code - maybe...
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...
finplus Hi Wanjpt, I tried once only on AUD / USD in november 2016 during one day. No position has b...
finplus The backtest of the code works perfectly with 1 hour timeframe.
CN Anyone got a correct code for the setup?Used Minihax code with mixed results... Anyone that ...
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 ...
Nicolas You have certainly apply the indicator twice on the price chart. If you want to hide one of ...
fabriziomerlo Buongiorno Nicolas,  come faccio a trasformare questo interessantissimo indicatore in uno s...
Nicolas Si desidera testare una croce sopra di 2 media mobile? Si prega di fare un argomento nel for...