Download MetaTrader 5
To add comments, please log in or register
Sell products via the Market and track your sales statistics
ForexTrader17
1009
ForexTrader17 2015.06.11 02:16 

Is there a built in function that compares "a" bar to the last "x" number of bars? Example if high of last bar is higher than any high in bars 4 to 15.

Thank you. 

Keith Watford
Moderator
7887
Keith Watford 2015.06.11 02:22  

No,

use High and iHighest to find the highest high of the required sequence of bars

Then compare with the high of the last bar. 

ForexTrader17
1009
ForexTrader17 2015.06.11 18:31  
GumRai:

No,

use High and iHighest to find the highest high of the required sequence of bars

Then compare with the high of the last bar. 

Thank you. Is it possible to make such a function?

And in the sam way can we compare the last level of say an indicator like RSI to the past few levels? Or can we look back at say the highest high of the RSI in the last x number of bars?

Thank you. 

whroeder1
13596
whroeder1 2015.06.11 19:38  
Eric1704: . Is it possible to make such a function?
Of course. As GumRai said, its only High[], iHighest, and the index. learn to code it, or pay someone. We're not going to code it FOR you. We are willing to HELP you when you post your attempt (using SRC) and the nature of your problem.
/
To add comments, please log in or register