What function would you use to list the symbols?

What function would you use to list the symbols?

Manage alerts

Loading saved threads...

Jon Thetford · External communityPost link
External question — Stack Overflow Stack Exchange Author: Jon Thetford Original post: https://stackoverflow.com/questions/67628539 License: CC BY-SA 4.0 — https://creativecommons.org/licenses/by-sa/4.0/ Adaptation: HTML converted to plain text; contact email addresses removed. Is there a way to set a condition that includes a list of currency symbol pairs and be alerted when that condition is met? What function would you use to list the symbols? Thanks in advance. The following code gives you a rough idea of what i'm trying to do. for(i=0;i<Bars; i++) { //Want a list of symbols to scan multiple currency pairs for the following condition if(Symbol("EURUSD";"AUDCAD";"USDJPY")Close[i+1]>Close[i+2]) { a=a+1; //This is what I want to happen if condition is met Alert(Symbol()+" 1"); }
Quote
Report
PaulB · External communityPost link
External answer — Stack Overflow Stack Exchange Author: PaulB Original post: https://stackoverflow.com/a/67632959 License: CC BY-SA 4.0 — https://creativecommons.org/licenses/by-sa/4.0/ Adaptation: HTML converted to plain text; contact email addresses removed. You can use SymbolsTotal and SymbolName to get a list of all the symbols in Market Watch. The following code should give you a start (although it will be permanently giving alerts, I think you need to check exactly what you want alerts for) . for(int i=0; i<SymbolsTotal(true); i++) { string currencySymbol=SymbolName(i,true); int a=0; for(j=0; j<iBars(currencySymbol,0); j++) { if(iClose(currencySymbol,0,j)>iClose(currencySymbol,0,j+1)) a++; { if(a>0) Alert(StringConcatenate(currencySymbol,":",IntegerToString(a))); }
Quote
Report

Post Reply

Checking account access…