Hi, all! I'm using Markets.com as Forex broker to test my EAs. I'm using iLowest() and iHighest() in my EA for the first time, this way: g_iMaxBar = iHighest(NULL, ANALYSIS_PERIOD, MODE_HIGH, 10, 1); g_iMinBar = iLowest(NULL, ANALYSIS_PERIOD, MODE_LOW , 10, 1); dMaxValue = iHigh(NULL, ANALYSIS_PERIOD, g_iMaxBar); dMinValue = iLow(NULL, ANALYSIS_PERIOD, g_iMinBar);
In the ANALYSIS_PERIOD input parameter I select H1, and I run the EA in this period anyway, but the intention is to select any, independent of the chart. I have downloaded the data from the history center, as the attached document illustrates. However when I try to get the highest and lowest values the values gotten are wrong. Could anyone please help me?Thanks and best regards.Fabrizio.
g_dMaxValue = High[ iHighest(NULL, ANALYSIS_PERIOD, MODE_HIGH, 10, 1)];
int iHighest( string symbol, // symbol int timeframe, // timeframe int type, // timeseries int count, // cont int start // start );
yes it work,
the problem is that it cannot get the right index i on this one timeframe, so it has to use iHigh( ) thereafter
Hi, WHRoeder and ffoorr.
Thanks for your fast return! Sorry for the lack of information provided, so it's impossible to help me the way I need. As a matter of fact, I have a log file to my application, and I will include the information of each bar, as recommended. I only saved the data returned by iHighest() and iLowest(), and compared it to looking at the 10 bars on chart. That's why I opened this topic. Please I kindly ask you not to close this yet. I'm at work office (Forex is still not my main occupation) and I'll post new information as soon as possible.Thanks again and best regards.
Hi, WHRoeder and ffoorr. How've you been?
First of all, thanks for all the recommendation/suggestion about what I could do to solve the problem, that was solved indeed.
The more we post, the more we learn. Next time, if needed, I'll post as much information as possible to be helped.
I kindly ask you to close this issue.
To add comments, please log in or register