Questions from Beginners MQL5 MT5 MetaTrader 5 - page 361

 
forexman77:
1.Can you find out from history how many ticks have been up and down in tick volume?

2.It's been a few months since I deleted autochartis, but the log messages keep popping up. The software keeps trying to open the files.

How to erase autochartis completely?


On the second question: you need to find in which template the autochartis entry was left.
 
Karputov Vladimir:
On the second question: you need to find which template has the autochartis entry.
Do you mean the "profiles" folder where the chart01.chr file is? (MQL4).
 
forexman77:
Are you referring to the "profiles" folder which contains the chart01.chr file? (MQL4)
Well, you shouldn't go directly to the system files. You need to look at which chart is showing errors. After that, you need to review which indicators and Expert Advisors are on the chart. Delete unnecessary ones.
 
Karputov Vladimir:
Well, don't go directly to the system files. You need to look at which charts are showing errors. After that you need to look at which indicators and EAs are present on the chart. Delete unnecessary ones.
... And rewrite the template.
 
if(CountTrades()==0)// поверить есть ли открытые ордера 
  {
   double ima=iMA(Symbol(),0,14,0,MODE_SMA,PRICE_CLOSE,1);

//+------------------------------------------------------------------+
   int CountTrades()
     {
      int count=0;
      for(int i= OrdersTotal()-1; i>=0; i--)
        {
         if(OrderSelect(i,SELECT_BY_POS))
           {
            if(OrderSymbol()==Symbol() && OrderMagicNumber()==Magic)
               count++;
           }
        }
      return (count);
     }
//+------------------------------------------------------------------+


i want to change the function so it will not only check if there are open orders, but if there are, it will return the value of the orders

 
Mikhail Lebedev:


i want to change the function so it will not only check if there are open orders, but if there are, it will return the value of the orders

int Total Ord=0,BOrd=0,SOrd=0;
void CountTrades()
     {
      Total Ord=0,BOrd=0,SOrd=0;
      for(int i= OrdersTotal()-1; i>=0; i--)
        {
         if(OrderSelect(i,SELECT_BY_POS))
           {
            if(OrderSymbol()==Symbol() && OrderMagicNumber()==Magic)
            Total Ord++;
            switch (OrderType())
             {
              default: break;
              case 0:  
                BOrd++; 
                break;
              case 1:  
                SOrd++;
                break;
             }
           }
        }
     }
 
Vitalie Postolache:
ok.
 
Vitalie Postolache:
I tried to insert into the EA the void CountTrades() function, the compiler complains, because void CountTrades() does not return anything, it must be int CountTrades()
 

Don't kick me, I'm not in the loop yet.

I have a couple of questions:

1 is it technically possible to write something that will alert me (visually and audibly) that on the charts of the same pair with different timeframes, the same indicator/oscillator is in the same position.

2 how complicated it is

3. Should I start studying mql in order to create this component?

 
Mikhail Lebedev:
I tried to insert into EA the void CountTrades() function, the compiler complains, because void CountTrades() does not return anything, it must be int CountTrades()
Show me a screenshot of the process, no one has ever complained about vode that it didn't return values. Vode is designed not to return anything.
Reason: