Coding help please, can anyone make this MT5 indicator based on fractal collect data from other time frame?
No free help
urgent help.
Or pay someone. Top of every page is the link Freelance.
Help you with what? You haven't stated a problem, you stated a want. Show us your attempt (using the CODE button) and state the nature of your problem.
No free help
urgent help.
Or pay someone. Top of every page is the link Freelance.
Thanks William Roeder,
I thought it's easy for someone here to make this indicator take data from other time frame, for example add an option to the indicator " use time frame H1,4H...etc , this is the help I need.
Best Regards
Try line 64 FRA_Handle=iFractals(NULL,0); The 0 means current time frame. If you push F1 the help menu launches, then type iFractals, by period you can click on Enum_timeframes, find the time frame you want and copy it, then place it where the zero is
FRA_Handle=iFractals(NULL,PERIOD_MN1)
Try line 64 FRA_Handle=iFractals(NULL,0); The 0 means current time frame. If you push F1 the help menu launches, then type iFractals, by period you can click on Enum_timeframes, find the time frame you want and copy it, then place it where the zero is
FRA_Handle=iFractals(NULL,PERIOD_MN1)
Many Thanks,
I did it but the indicator now work only on the MN1 chart and not showing anything on other time frames.
Best Regards
I found these links helpful, I could not get the code to use the other time frame data
For mql4
https://www.mql5.com/en/forum/173574/page348#comment_4542105 Looked at code in remjie's post r3_mtf_matrv2.mq4
line 103 ArrayCopySeries(TimeArray,MODE_TIME,Symbol(),TimeFrame);
This function not available in mql5
https://www.mql5.com/en/forum/188388
- www.mql5.com
So have to somehow use this code for mql5
https://www.mql5.com/en/docs/series/copyrates
void OnStart() { //--- MqlRates rates[]; ArraySetAsSeries(rates,true); int copied=CopyRates(Symbol(),0,0,100,rates); if(copied>0) { Print("Bars copied: "+copied); string format="open = %G, high = %G, low = %G, close = %G, volume = %d"; string out; int size=fmin(copied,10); for(int i=0;i<size;i++) { out=i+":"+TimeToString(rates[i].time); out=out+" "+StringFormat(format, rates[i].open, rates[i].high, rates[i].low, rates[i].close, rates[i].tick_volume); Print(out); } } else Print("Failed to get history data for the symbol ",Symbol()); }
I don't know how to get it to work, need advice from someone more skilled than me
- www.mql5.com
Working with Multi-Timeframes is not so simple. You need to have 'at least' the historical data for such timeframe.
Technical details are long, but to be short, and for you to be able to test it, first open the symbol chart, then manually change it to M1, then to H1, then MN1, so Metatrader can download data to build the intermediary timeframes.
After it, test your code.
Otherwise you may see empty charts or graphics [or empty copy arrays] and will spend hours trying to figure out that was not your code error, but just missing bars. ;)
Metatrader by default only download chart data when you open such timeframe on the main chart. So to have an indicator showing another timeframe, it has to be opened at least once on that timeframe.
- Most brokers only have 32 or 65K bars of history per timeframe. That's 45 days of M1, 2.5 years on M15, etc.
- Quickly DL all available history from your broker: Problem loading historical data - MQL4 programming forum
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi all,
I using a very helpful MT5 indicator which I found it free in this website, I use it in my daily trading, but I see it will be great if I can choose which time frame should the indicator collect data from, for example I attach it to daily chart but I want the indicator showing results based on the monthly chart, Can anyone help me please?
Best Regards