This forum is in read-only mode now. You may discuss your questions on forums of MQL4.community and MQL5.community

Multiple timeframes


Back to topics list
avatar
86
JannikKristensen 2005.12.20 03:15 
Any know if it is posible to programe an indicator which allows multiple timeframes ( to add for example 3 indicators in same chart Macd for example) And for example looks at weekly daily and hour 4 timeframes ?



Jannik
avatar
33
hardwood 2005.12.22 02:47 
Yes, Jannik, this is one of the nice things in MetaTrader - you can specify the time frame for all technical indicator calls:

example:
Macd_5_min=iMACD(NULL,5,12,26,9,PRICE_CLOSE,MODE_MAIN,1);

Macd_hourly=iMACD(NULL,60,12,26,9,PRICE_CLOSE,MODE_MAIN,1);

Macd_daily=iMACD(NULL,1440,12,26,9,PRICE_CLOSE,MODE_MAIN,1);

Then you can make your indicator based on these values:

Hope this helps,

Hugh
Back to topics list  
Download MetaTrader 5 (450 Kb, web installer) — a new terminal for financial markets