Errors, bugs, questions - page 1012

 

ns_k:

...Actually almost everything is clear, except that it looks a bit strange that if you find an indicator on the chart the script is running on, you have to create the indicator again...

see... Table in the "Program Execution" section
 

Can you please tell me if it is possible to make an exit button from the indicator?


What should I prescribe when pressing it?

 
denkir:
see. Table in the "Running programmes" section
Thank you! This is very useful information, but I still don't understand how you can get the indicator data from the chart before running the script)
 
ns_k:
Thank you! It is very useful information, but I still don't understand how you can get the indicator data from a chart in a script, that was on a chart before the script was called)

Seems easier to run from the script https://www.mql5.com/ru/forum/3108

Upd ChartIndicatorName

Индикатор, установленный пользователем
Индикатор, установленный пользователем
  • www.mql5.com
Существует ли возможность получения handle индикатора, который был прикреплен к графику пользователем?
 
zfs:

Can you please tell me if it is possible to make an exit button from the indicator?


What should I prescribe when pressing it?

Try ExpertRemove(). The indicator is not an Expert Advisor, of course, but it should work.
 
MetaDriver:
Try ExpertRemove(). The indicator is not an EA, of course, but it should work.
Is there no such thing for an indicator?
 
zfs:

Please tell me if you can make a button to exit the indicator?


What do I write when I press it?

ChartIndicatorDelete

Deletes indicator with specified name from specified chart window.

 
kPVT:

ChartIndicatorDelete

Deletes an indicator with a specified name from the specified chart window.

Thank you.
 
   int l=SymbolsTotal(false);
   for(int i=0;i<=l;i++) 
     {
      if(StringLen(SymbolName(i,false))==6 && SymbolInfoInteger(SymbolName(i,false),SYMBOL_TRADE_CALC_MODE)==SYMBOL_CALC_MODE_FOREX && SymbolInfoInteger(SymbolName(i,false),SYMBOL_TRADE_MODE)==SYMBOL_TRADE_MODE_FULL && SymbolInfoInteger(SymbolName(i,false),SYMBOL_SPREAD)<100) SymbolSelect(SymbolName(i,false),true);
      else SymbolSelect(SymbolName(i,false),false);
     }

Please advise what is wrong, the market watch should only contain forex instruments with an allowed trade and a spread of less than 100p

Документация по MQL5: Стандартные константы, перечисления и структуры / Состояние окружения / Информация о запущенной MQL5-программе
Документация по MQL5: Стандартные константы, перечисления и структуры / Состояние окружения / Информация о запущенной MQL5-программе
  • www.mql5.com
Стандартные константы, перечисления и структуры / Состояние окружения / Информация о запущенной MQL5-программе - Документация по MQL5
 
dentraf:

Please advise what is wrong, the market watch should only contain forex instruments with an allowed trade and a spread of less than 100p

Like this
for(int i=0;i<l;i++)
Reason: