Indicators with alerts/signal - page 544

 

thank you ,have a good day

 

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

// 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

 

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?

 
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

 

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

 
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:
 

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

Files:
 
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.

 

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?

 
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.