Here are two ways to find previous 5 bar high. Both have not been tested and I hope are correct.
input int PastBars = 5; // Number of past bars to find highest bar. double High[]; double BarHigh=0; // Highest bar value from PastBars range. ArraySetAsSeries(High,true); int copied=CopyHigh(symbol,0,0,PastBars),High); if(copied>0 && PastBars<copied) BarHigh=High[PastBars]; Print("Highest bar value from previous ",PastBars," bars is ",BarHigh);
Can use following code to find Open, High, Low, Close and Tick_Volume values.
input int PastBars = 5; // Number of past bars to find highest bar. double BarHigh = 0; // Highest bar value from PastBars range. MqlRates rates[]; ArraySetAsSeries(rates,true); double copied=0; copied=CopyRates(Symbol(),0,0,PastBars,rates); if(copied>0) { double size=fmin(copied,PastBars); for(int i=0;i<size;i++) { If(rates[i].high > BarHigh) BarHigh=rates[i].high; } } Print("Highest bar value from previous ",PastBars," bars is ",BarHigh);
Here are two ways to find previous 5 bar high. Both have not been tested and I hope are correct.
Can use following code to find Open, High, Low, Close and Tick_Volume values.
thankyou to wavkena, it seems to be do more in mql5~ ~
thankyou to wavkena, it seems to be do more in mql5~ ~
Absolutly!!!!
this comment was deleting now they are censoring bad comments about MQL5!!
Metaquotes you are just one point to loose client, One minipoint!
The more I learn about MQL5 the more I hate it. And now you are censoring bad comments regarding it. Just started learning the language a week ago and I cant believe how many stupid decisions where made regarding the compatibility and easy access for users of MT4 to the new language.
Horrible!
Learn the lesson and change soon instead of censoring.
Absolutly!!!!
this comment was deleting now they are censoring bad comments about MQL5!!
Metaquotes you are just one point to loose client, One minipoint!
The more I learn about MQL5 the more I hate it. And now you are censoring bad comments regarding it. Just started learning the language a week ago and I cant believe how many stupid decisions where made regarding the compatibility and easy access for users of MT4 to the new language.
Horrible!
Learn the lesson and change soon instead of censoring.
Please stop flooding the forum with your mql5 complaints. Thanks.
Alain I have been dealing with MT5 for a week and really its an insult to my eyes, never ever a good replacement for mt4. Are you censoring me? This is the political of the company? Os it agaim the rules to complaint about MT5 now? Dont you see my complaints could open the eyes of someone and save the company? Im not flooding im expressing my opinion, this product is horrible!
Alain I have been dealing with MT5 for a week and really its an insult to my eyes, never ever a good replacement for mt4. Are you censoring me? This is the political of the company? Os it agaim the rules to complaint about MT5 now? Dont you see my complaints could open the eyes of someone and save the company? Im not flooding im expressing my opinion, this product is horrible!
You should calm down a bit, nobody is censoring you. Are you still able to think logically ? I am asking you to stop digging old topic to post your complaints about mql5/MT5. You have your opinion that's fine, but I will not let you flood the forum with it unless it's on topic.
Yeah i made my point, I thought my comment was deleted, maybe was not I dont know. Anyways my point is very clear by now :p
Yeah i made my point, I thought my comment was deleted, maybe was not I dont know. Anyways my point is very clear by now :p
@luis they should keep censoring, who have time to learn different language with same old meaning,they keep deleting people post..
I can only improve on my mt4 new code addition,but to learn new language with useless word patches,not me...
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
I want to get the last 5 bar high in MQL5
how to do it?
THANKS