Need coding help pls

 

Hi All,

Below is my alert condition in the code. Now I want to restrict the alert only to a particular list of symbols.

For Eg. if (_symbol={EURUSD, USDCAD, GBPUSD, GBP,JPY, NZDUSD, NZDJPY}) then it should trigger the below code. If the symbol is not in the list then it should not trigger the alert. Please let ,e know how to implement this logic. I would like to provide the symbols as comma separated since it will be a long list.



 if (A_M5_Previous_Sum < 25 && alertSum == 25)
            {
              Alert("Buy: " + _symbol+ " ; Prev Close=" +Prevclose+ " ; CMP=" +Dailyclose + " ; %Change=" + Percent);
            }
            else if (A_M5_Previous_Sum > -25 && alertSum == -25)
            {
              Alert("Sell: " + _symbol+ " ; Prev Close=" +Prevclose+ " ; CMP=" +Dailyclose + " ; %Change=" + Percent);
            }


Thanks,

Sanjay

 
sanjay20082016: Please let ,e know how to implement this logic.
  1. How do you think you implement it? Create a constant array of the symbols, go through the array, one by one until you find a match, or not.
  2. You have only four choices: We're not going to code it for you (although it could happen if you are lucky or the problem is interesting.) We are willing to help you when you post your attempt (using SRC) and the nature of your problem.
Reason: