I want to get the range pips of several pairs, and trade the pair with bigger volatility or wider range
something like:
//variables
Double range=0;
Double temp=0;
Array pairs [Instrument.EURUSD, Instrument.GBPJPY, Instrument.USDCHF……]; // array of Instruments
For(i=0;i<pairs.lenght;i++){
range = Math.abs(PipsRange(Pairs[i])); //ie, using daily or weekly MIN MAX indicator
If(range>temp){
biggerRange = range;
pairToTrade = Pairs[i];
}
temp=range;
}
Please, Any help to program this?
BR