In an EA I need to search a predefined list of currency pairs for a specific pair and return the corresponding value. The pair to be searched for is declared as an input at the start of the script.
In the example below, how would I search for “EURCAD” and have it return the value 3.0?
extern string Pair=“EURCAD”;
Could someone kindly provide example code as it relates to this scenario? I’ve been searching hours now for the best way to achieve this and I’m stuck.
Thank you for the assistance!