Indicators with alerts/signal - page 548

Michael Hand
173
Michael Hand  

Mladen - you very kindly made an indicator called MA zones which (vertically) colours the chart according to whether above/below a specified EMA. Is it possible to have the same but coloured coded according to the contour of the specified MA?

Mladen Rakic
154654
Mladen Rakic  
dacian21:
//-----------------------------------------------------------------------------

// function: NextHigherTF()

// Description: Select the next higher time-frame.

// Note: M15 and M30 both select H1 as next higher TF.

//-----------------------------------------------------------------------------

int NextHigherTF(int iPeriod) {

if (iPeriod==0) iPeriod=Period();

switch(iPeriod) {

case PERIOD_M1: return(PERIOD_M5);

case PERIOD_M5: return(PERIOD_M15);

case PERIOD_M15: return(PERIOD_H1);

case PERIOD_M30: return(PERIOD_H1);

case PERIOD_H1: return(PERIOD_H4);

case PERIOD_H4: return(PERIOD_D1);

case PERIOD_D1: return(PERIOD_W1);

case PERIOD_W1: return(PERIOD_MN1);

case PERIOD_MN1: return(PERIOD_MN1);

default: return(Period());

to

dacian21

Enter "next" in the time frame parameter of this version and it will automatically choose next time frame

ableq
9
ableq  

Hi,Mrtools,the Cybercycle_alert always prompt to buy,but not to sell, is something wrong?

William Snyder
9492
William Snyder  
nbasuperstar:
Hi,Mrtools,the Cybercycle_alert always prompt to buy,but not to sell, is something wrong?

Yeah sorry about that, this one should be correct now.

Files:
Felicia
9
Felicia  

Is it possible to add an alert after close to this indicator?

Files:
William Snyder
9492
William Snyder  
Mis.Parker:
Is it possible to add an alert after close to this indicator?

Mis.Parker, there's one here, https://www.mql5.com/en/forum/180648/page292 maybe check out if that's what you had in mind.

stan dacian
44
stan dacian  

Malden Thanks a lot!

If I want to change next time frame how can I do?

for example, to pass the time frame M5 return for M30

time frame M1 return for M15 etc?

William Snyder
9492
William Snyder  
dacian21:
Malden Thanks a lot!

If I want to change next time frame how can I do?

for example, to pass the time frame M5 return for M30

time frame M1 return for M15 etc?

In here, extern string TimeFrame = "Current time frame"; change Current time frame to either M30 OR JUST 30 to see 30 minute time frame on m5 chart, can change it to any time frame used by meta trader.

stan dacian
44
stan dacian  

Already parameter Timeframe = "Current time frame" I introduced NEXT! So I as already set a new "Current time frame".

Thank you!

It is necessary for building a setting. ea. I use a software interface that does not recognize MTF as written in this momement. That is why we need a parameter:

/ / ------------------------------------------------ -----------------------------

/ / Function: NextHigherTF ()

/ / Description: Select the next higher time-frame.

/ / Note: M15 and M30 both select H1 as next higher TF.

/ / ------------------------------------------------ -----------------------------

NextHigherTF int (int iPeriod) {

if (iPeriod == 0) iPeriod = Period ();

switch (iPeriod) {

case PERIOD_M1: return(PERIOD_M15);

case PERIOD_M5: return(PERIOD_M15);

case PERIOD_M15: return(PERIOD_H4);

case PERIOD_M30: return(PERIOD_H1);

case PERIOD_H1: return(PERIOD_H4);

case PERIOD_H4: return(PERIOD_D1);

case PERIOD_D1: return(PERIOD_W1);

case PERIOD_W1: return(PERIOD_MN1);

case PERIOD_MN1: return(PERIOD_MN1);

default: return(Period());

Like that because it is recognized MTF to use the software that I have.

Thank you!

kedked
7
kedked  

Hi Mladen - greatly appreciate your expertise, suggestions and explantion. This certainly lights the way forward.