Creating Function to count number of opened Currency Pairs
Topic: Creating Function to count number of opened Currency Pairs
Could anybody please assist me as I don't know where I got this code wrong.
I am trying to create a function named "OrdersTotalSymbolOpen()" to check for open trade on any of the following pairs namely EURUSD, GBPUSD, USDJPY, EURJPY and GBPJPY. It assigns value 1 to any pair that is currently open otherwise the value will be equal 0.The function is to return the value of variable "TotalCount" which is the sum of the number of pairs opened out of the 5 pairs.
The problem is that it keeps returning value "0" even when the 5 pairs are opened.
I attached the code for your perusal and correction. Thanks for your anticipated cooperation.