How To Scan All Symbols With Special Condition And Show The Results

 

Hi friends, I'm going to use a filter in the stock market to display, for example, symbols with RsI values ​​greater than 70. And I want this filter to be applied to all the symbols on the market watch. Then specify the names of all the symbols with the defined conditions. The main problem is that in general I have to use an indicator, expert or script? And the next problem is how should the symbols be selected one by one and displayed after checking if the conditions were correct? The only thing that came to my mind was the following code, but the problem is that even if this code is correct. Can't use it anywhere outside of this circle? Is there any solution! Of course, I spent hours researching other topics, but my problem was not solved. Thanks if there is an accurate solution. Thank you For Your Valued Time Here.

Best Wishes


string allsymbols[];
  
for(int i=0; i<=SymbolsTotal(true)-1; i++)
     {
      allsymbols[i]=SymbolName(i,true);
     }
 
  1. Your code is not correct — the array has no size, you can't store into it.
  2. No idea what you mean you “can't use it anywhere.”
 
William Roeder:
  1. Your code is not correct — the array has no size, you can't store into it.
  2. No idea what you mean you “can't use it anywhere.”

Ok Thank you Very Much, I Finally Figure This Out, And Just Done Everything, Still Have a Problem, And It's About The Shift, In MQL4 Language We Used  Number Of Candles (Shift) To Access The Indicator Data, But In MQL5 Language We Have To Use a handle And I know This Well, In This Case I Want To Compare Open And Close Prices Of Two Last Candles In Each Symbol With Their Parabolic SAR Amount, To Know If There I a Change In Parabolic SAR Status, But I can't Figure This Out, The Problem Is My Logical Section Can Not Understand Where and How Should I Fix It, If Any one Has an Idea It Would Be A Pleasure To Hear It, Thanks a Lot For Understanding. Best Regards 

Here is The Code 

input double step=0.02; // Parabolic SAR Step
input double maximum=0.2; // Parabolic SAR MAximum
//---

void OnStart()
  {
  
//---
   Comment("Parabolic SAR Filter ","Activated");
   int Sym= SymbolsTotal(false);
//---

   for(int i=0; i<Sym; i++)
      {
         string chart= SymbolName(i,false);
         double open1=iOpen(chart,PERIOD_D1,0);
         double close1=iClose(chart,PERIOD_D1,0);
         double open2=iOpen(chart,PERIOD_D1,1);
         double close2=iClose(chart,PERIOD_D1,1);
         
            if(open2<iSAR(chart,PERIOD_D1,step,maximum) && close2<iSAR(chart,PERIOD_D1,step,maximum) && open1>iSAR(chart,PERIOD_D1,step,maximum) && close1>iSAR(chart,PERIOD_D1,step,maximum))
               Print(chart," = ","Parabolic Up Trend");
      }
   ChartRedraw();  
  }
 

Do not double post!

I have deleted your duplicated topic!

Reason: