Coding help - page 323

 

Hi Mladen,thanks again for the help before,I need to add something to the code before for "HMA_Russian_colors" indicator, trend area in higher TF, i have as follow:

FOR SELL

double currentHTF = iCustom(NULL,1440,"HMA_Russian_Color",HMA_PERIODHTF,3,0,0);

double previous1HTF = iCustom(NULL,1440,"HMA_Russian_Color",HMA_PERIODHTF,3,0,1);

double previous2HTF = iCustom(NULL,1440,"HMA_Russian_Color",HMA_PERIODHTF,3,0,2);

double TrendStart = (currentHTF previous2HTF) // slope changes down in HTF

double TrendEnd = (currentHTF > previous1HTF && previous1HTF < previous2HTF) // slope changes up in HTF

How can i write condition for Sell only between TrendStart & TrendEnd??

I tried

if(TrendStart) --- sell

else(Trendend) --- close orders, without effort as orders trigger exactly at this point not between them.Thanks

 
mladen:
That indicator does nt have any limitation in the number of candles it is showing at all (and there is no option that can limit it). See the example :

hi mladen

please can you add gmttimeoffset in it

thx

 

Coding help

Good morning to all:

Hello mladen

Please could you help me fix the warning in this indicator.

I am not able to solve it.

Thank you very much.

Kind regards.

Hermo.

 
Hermo:
Good morning to all:

Hello mladen

Please could you help me fix the warning in this indicator.

I am not able to solve it.

Thank you very much.

Kind regards.

Hermo.

Hermo

No more warning : linea_apertura_diaria_1.mq4

 
Hermo:
Good morning to all:

Hello mladen

Please could you help me fix the warning in this indicator.

I am not able to solve it.

Thank you very much.

Kind regards.

Hermo.

Dear Hermo,

Try this.... hope it helps

yours truly

AZRUL...

Files:
 
12BPRO:
Dear Hermo,

Try this.... hope it helps

yours truly

AZRUL...

It works fine

 

Coding help

Good afternoon:

As I am working with this indicator mladen multiple instances of MT4 on as many charge much relantiza running MT4.

You could add a number of filter rods, I've tried copying it from other codes but is a failure.

parameter: Max. Bars:

I can help.

Thank you very much as always.

A big hug.

Hermo.

 
Hermo:
Good afternoon:

As I am working with this indicator mladen multiple instances of MT4 on as many charge much relantiza running MT4.

You could add a number of filter rods, I've tried copying it from other codes but is a failure.

parameter: Max. Bars:

I can help.

Thank you very much as always.

A big hug.

Hermo.

Dear Hermo,

Try this

Files:
 
Hermo:
Good afternoon:

As I am working with this indicator mladen multiple instances of MT4 on as many charge much relantiza running MT4.

You could add a number of filter rods, I've tried copying it from other codes but is a failure.

parameter: Max. Bars:

I can help.

Thank you very much as always.

A big hug.

Hermo.

A version with a limited number of bars to calculate : tma_with_distances_1.01_nmc.mq4

 

Hi guys, I'm trying to calculate the Average True Range of an indicator. Not sure I'm doing right with this :

double high = Indicator[ArrayMaximum(Indicator,ATRLookbackperiod,i)];

double low = Indicator[ArrayMinimum(Indicator,ATRLookbackperiod,i)];

ATR = MathMax(MathMax((high - low),(high -Indicator)),(Indicator - low));

double atr = iMAOnArray(ATR,0,ATRPeriod,0,MODE_SMA,i);

If anybody has an idea, please let me know. Thanks a lot.

Reason: