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 :
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
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" |
Share this
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 :
Filename : download the ITF files
How to import ITF files into ProRealTime platform?
PRC is also on YouTube, subscribe to our channel for exclusive content and tutorials
Hello Doctrading.
Can you ask you for something?
Can you code a screener screen pop guns?
And the screener change to use for a strategy with
entry after long triggercandle + x-points,
stop after x-percent of the trigger candle,
takeprofit of x-percent (maybe with/like fibo-levels)
?
kind regards?
blue