MQL4 - automated forex trading   /  

Forum

How to show indicator just on some timeframes ?

Back to topics list To post a new topic, please log in or register

avatar
59
edas 2010.10.06 12:26 

Hello,

I have very simple question:

How to show indicator just on some timeframes ? 

If indicator is attached to chart, I could select time frames I want to be shown on Indicator->Visualization.

But is it possible to select timeframes in indicator code ?

 

Thanks,

Edward 

Expert Advisors Based on Popular Trading Systems and Alchemy of Trading Robot Optimization (Cont.)

Expert Advisors Based on Popular Trading Systems and Alchemy of Trading Robot Optimization (Cont.)

In this article the author continues to analyze implementation algorithms of simplest trading systems and describes some relevant details of using optimization results. The article will be useful for beginning traders and EA writers.


avatar
133
01005379 2010.10.06 15:31 

Hello!

if vou know for which time frames to show use something like this:

if (Period()==1 || Period()==15 ||Period()==240...){
//your code here
}

or if you want to select for which time frame to show you need extern variables...

extern bool M1=false;
extern bool M5=false;
extern bool M15=false;
...
Back to topics list  

To add comments, please log in or register