https://docs.mql4.com/indicators/iCustom
This will allow you to use multiple timeframes at once. Use that in your ea to get info on timeframes other than your current one.
https://docs.mql4.com/indicators/iCustom
This will allow you to use multiple timeframes at once. Use that in your ea to get info on timeframes other than your current one.
Thanks for the response, jmca.
I actually just referenced the period after using periodconverter.mq4 to create the .hst file. As long as the period converter indicator is actively drawing and updating data from the custom time frames, it looks like I can just specify the custom timeframe as the extern "period" indicator without any change in the mtf code itself. For example..
Open GBPUSD H1
Attach periodconverter.mq4
Set the 'period multiplier' to 3 on the H1 chart to create an H3 offline chart that is actively updated by the indicator.
Back on the H1 chart, add the mtf indicator and just make sure the period itself references the correct data set from the history for the custom chart. In this case, it will be referenced using "180" (H3=180).
:)
Here's the final product! I'm using this same profile for each of the 9 pairs I trade regularly and will add more once comfortable to enable more trading possibilities. I had a lot of trouble getting MT4 to even open after manually adding the new profiles. I ended up having to reinstall (a couple times) and manually add all 9 of them before the program itself launched for the first time but it was definitely worth it. It's running great now!
So here's a description of what's on the picture. I have one H1 chart open. On the H1 chart I have 4 instances of periodconverter.mq4 for all the custom period offline charts on the bottom. Then, I enabled the mtf MACD indicator I created yesterday for each of the custom time frames created by period converter!
In total, there are 9 indicators running on this chart, five of them taking data in real time from the other custom offline charts. The prices are refreshing beautifully and terminal.exe is using an unbelievable 23,652K of memory!!
Any feedback is appreciated as this is my first real independent project in MQL4! Thank you to the authors of the MQL4 book available on this website for giving me the courage to take on a task I never thought I'd be able to accomplish!
Now to automate oO ....
Here's the final product! I'm using this same profile for each of the 9 pairs I trade regularly and will add more once comfortable to enable more trading possibilities. I had a lot of trouble getting MT4 to even open after manually adding the new profiles. I ended up having to reinstall (a couple times) and manually add all 9 of them before the program itself launched for the first time but it was definitely worth it. It's running great now!
So here's a description of what's on the picture. I have one H1 chart open. On the H1 chart I have 4 instances of periodconverter.mq4 for all the custom period offline charts on the bottom. Then, I enabled the mtf MACD indicator I created yesterday for each of the custom time frames created by period converter!
In total, there are 9 indicators running on this chart, five of them taking data in real time from the other custom offline charts. The prices are refreshing beautifully and terminal.exe is using an unbelievable 23,652K of memory!!
Any feedback is appreciated as this is my first real independent project in MQL4! Thank you to the authors of the MQL4 book available on this website for giving me the courage to take on a task I never thought I'd be able to accomplish!
Now to automate oO ....
I'm jealous. Can't seem to accomplish what you have via use of vhands in MTF
This custom timeframe/converter thing - have you actually established that it will assist in making profits, or is this merely a technical programming exercise at this stage?
Hey Blogzr3,
It was primarily a programming exercise for me as MACD is not a great standalone indicator. It's typically used as confirmation. I do, however, personally believe it can be used with great efficiency by itself as long as you don't chase forming conv/div. I haven't tested it over the long term, but I had this running on about 15 different currency pairs for a while and updated it every 3-5 days. Whenever divergence/convergence presents itself clearly on the the larger time frames (D1/H4), wait for the H1 and M15 to show an opposite trend trying to form (hopefully with corresponding conv/div). Don't chase the indicator. It will show up once or twice a week if you have it on enough charts. The best trades seemed to be the same direction con/div on different time frames. Trade the smaller time frame.
I've been working on some other things so let me know if you test it. I had some great trades with it (check out what G/C did on Jan 13... I went short at the red line in the picture above) but now I'm working hard to get information like this to just export automatically.. not just positive and negative but actual realtime MACD levels.
Here are a couple spreadsheets I updated to keep track of it. I found the standard time frames suffice just fine. All you have to do is enter the values on the left and the right side will change automatically :)
R
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hey everyone. I'm fairly new to programming but I've recently gone through the (fantastic) book on this site and have a couple years of practical experience in MT4 modifying indicators and eas to the best of my ability. Now I'm ready to create my own system and I had a quick question.
I've an idea for a trading strategy that would be a great deal easier to program if I could use data from custom time frames created by periodconverter.mq4. Essentially, I stumbled across some multi-time frame indicators and found a couple of them work pretty well (they actually just display correctly). I will need to modify the indicator itself to work with my own oscillator, but the code seems to only allow the indicator's use with the standard periods in MT4.
Has anyone ever used data from custom charts created with periodconverter.mq4 (offline charts) for use in an multi-time frame indicator or ea? Periodconverter.mq4 has a .csv output option which I think I might end up having to use for the algorithms in the ea itself. Is this right?
Any and all help is greatly appreciated.
-R