Indicator "Candle & TMA8 open"

Category: Indicators By: Doctrading Created: August 30, 2016, 3:55 PM
August 30, 2016, 3:55 PM
Indicators
1 Comment

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)

// CONDITIONS D'ACHAT
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

// CONDITIONS DE VENTE
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
ENDIF

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

Download
Filename: Candle-TMA8-open.itf
Downloads: 251
Doctrading Master
Hello, I'm Marc. Nice to meet you.
Author’s Profile

Comments

Logo Logo
Loading...