Download MetaTrader 5

Analyse X last bars, need help please :)

To add comments, please log in or register
soukenson
19
soukenson 2016.08.26 13:35 

Hy there,

Firstly, I d like to apologise formy bad english skills:(, I promise I ll try to do my best :)

 

Indicators : EMA5 - EMA30 - EMA100

     CCI 12

Graph : Candles

TF : all

 

Why I need help, and What I need in my code for my indicator, thanks to your help:) : 

Buy Signal :

1. CCI cross UP -100

2. Prices are above EMA100

3. On the last X candles (for example 5 last candles excepted the current one, so shift =1 I guess ?), Signal is valide if on the x last candles, none crossed down EMA100 (Open and Close should be above EMA100, no matter if low crossed this ema100)

Sell Signal :

1. CCI cross DOWN 100

2. Prices are under EMA100

3. On the last X candles (for example 5 last candles excepted the current one, so shift =1 I guess ?), Signal is valide if on the x last candles, none crossed upEMA100 (Open and Close should be under EMA100 for the last X candles (here 5 last candles)), no matter if low crossed this ema100)

 

Don t hesitate if it s not clear as it should be :)

 

Thanks for help,

 

Have a good day :)

 

Soukenson

soukenson
19
soukenson 2016.08.26 13:44  

A precision, I don t know how to code the last X candles, with X as an extern variable :)

I try to do a boucle with for, but unsuccessfull :(

 

Thanks again :)

 

soukenson 

soukenson
19
soukenson 2016.08.28 12:40  

Hello,


Nobody ? :(


Have good Sunday to you all :)


Soukenson

Carl Schreiber
6669
Carl Schreiber 2016.08.28 21:38  
try to google for for what you want amend the closest version..
soukenson
19
soukenson 2016.09.01 11:36  

Thanks 

To add comments, please log in or register