rhodium1trading:
Hi
I wanted a script to open charts for all the "Unhidden" symbols in the Market watch. With some help, I tried the following code. But it opens all the symbols in the Market watch including the hidden ones. Could someone please help to filter only the "Unhidden (Showing)" symbols in the Market watch?
Thank you
the Selected in symbols total actually is the "in market watch" so you were almost there .
#property script_show_inputs true input ENUM_TIMEFRAMES timeFrame = PERIOD_H1; input string tplName = "1.tpl"; input uint ptsSpread = 20; int symIndex = 0; int symSpread = 0; string symName = ""; long chartID = 0; void OnStart() { for(symIndex = 0; symIndex < SymbolsTotal(true); symIndex++) { symName = SymbolName(symIndex, true); symSpread = SymbolInfoInteger(symName, SYMBOL_SPREAD); if(symSpread > ptsSpread) { continue; } chartID = ChartOpen(symName, timeFrame); ChartApplyTemplate(chartID, "//Profiles//Templates//" + tplName); ChartSetInteger(chartID, CHART_SHIFT, 0, true); } }
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Hi
I wanted a script to open charts for all the "Unhidden" symbols in the Market watch. With some help, I tried the following code. But it opens all the symbols in the Market watch including the hidden ones. Could someone please help to filter only the "Unhidden (Showing)" symbols in the Market watch?
Thank you