Users have asked how to filter out how many configured trading accounts are actually available from a bunch of added exchanges (different currencies).
In fact, there are several exchanges.
function main(){
var showArray = []
for(var i = 0; i < exchanges.length ; i++){
Log("Name:", exchanges[i].GetName(), "Label:", exchanges[i].GetLabel(), "#FF0000")
}
Log("筛选")
for(var j = 0; j < exchanges.length; j++){
var isFind = false
for(var n = 0; n < showArray.length; n++){
if(exchanges[j].GetLabel() == showArray[n].Label && exchanges[j].GetName() == showArray[n].Name){
isFind = true
}
}
if(!isFind){
Log(exchanges[j].GetLabel())
showArray.push({Name : exchanges[j].GetName() , Label : exchanges[j].GetLabel()})
}
}
Log(showArray)
}