Questions from Beginners MQL4 MT4 MetaTrader 4 - page 183

 
o8586_khamaganovalv:
Hello, could you please advise me, I am a novice trader, with a company ***. I traded with an analyst. Now I can't withdraw money from the platform, because they say I have to pay a commission for using the platform and for copying trades. Please tell me whether such a commission exists or I am cheated? Just read everywhere is written that automatically debited from the account when funds are withdrawn. But I am asked to pay extra and then allegedly withdraw the money.

So what kind of company is this?
If it is Teletrade = they say either bad or nothing...

Read reviews on the web about this company ... or on youtube ....
Did you have a contract with the company ?! ... Look at all the fine print... read the contract again ...

If they "allegedly" gave a BONUS to trade with for a newbie, that money can NOT be withdrawn .... even if you've traded in surplus ... That is why people do not take such "bonuses" but trade on their Own.

 

Hello.

Can you please tell me if it is possible to change the time zone in the standard pop-up with an alert?

I need to synchronize the time of the alert with the terminal time (when it's different in the terminal and the alert window). Is it possible?
 
Hello, could you tell me how to program the direction of a candlestick shadow? For example, let's take a pin bar. Its shadow may be directed up or down. How can this be implemented using the code in MQL4?
 

Hello.

Before you start working with iCustom, you need to do a check for this indicator. How can I do this?

 
Nauris Zukas:

Hello.

Before you start working with iCustom, you should check if this indicator is available. How to do it?

Interesting question, I suspect that if the question is in the MT4 topic, then the platform is respectively MQL4, I haven't found the answer in the documentation, quicker to check, made a test:

indicator "qwerty.mq4":

input int      Input1=10;
...
int OnCalculate(const int rates_total,
                const int prev_calculated,
                const datetime &time[],
                const double &open[],
                const double &high[],
                const double &low[],
                const double &close[],
                const long &tick_volume[],
                const long &volume[],
                const int &spread[])
  {
   int i,limit;
   if(prev_calculated==0) limit=rates_total-1; else  limit=rates_total-prev_calculated+1;
   for(i=limit; i>=0; i--) line1Buffer[i]=close[i];
   return(rates_total);
  }

Expert:

#property strict
void OnTick()
  {
   ResetLastError();
   double pr = iCustom(NULL,0,"qwerty",10,0,1);
   int err = GetLastError();
   printf("err = %d , pr = %f",err,pr);
  }

Log if the indicator is compiled and lies in the folder:

2019.08.13 18:17:17.319 tst EURUSD,H1: err = 0 , pr = 1.118490

2019.08.13 18:17:16.616 tst EURUSD,H1: err = 0 , pr = 1.118490

2019.08.13 18:17:16.554 tst EURUSD,H1: initialized

Removed indicator, expert log:

2019.08.13 18:18:27.815 tst EURUSD,H1: err = 4072 , pr = 0.000000

2019.08.13 18:18:27.815 cannot open file 'C:\Users\IgorM\AppData\Roaming\MetaQuotes\Terminal\2E8DC55551084565FA3E19C061F586B2\MQL4\indicators\qwerty.ex4' [2]

2019.08.13 18:18:27.549 tst EURUSD,H1: err = 4072 , pr = 0.000000

2019.08.13 18:18:27.549 cannot open file 'C:\Users\IgorM\AppData\Roaming\MetaQuotes\Terminal\2E8DC55551084565FA3E19C061F586B2\MQL4\indicators\qwerty.ex4' [2]

2019.08.13 18:18:26.815 tst EURUSD,H1: initialized

4072 "Error loading custom indicator"

I think it all adds up.

;)

 
Igor Makanu:

Interesting question, I suspect if the question is in the MT4 thread then the platform is respectively MQL4, didn't find the answer in the documentation, quicker to check, did a test:

Thanks. The script(expert) is for Market, so will have to go through the moderators. Because of the "cannot orep file" error that appears there, I'm not sure if the moderators will let it through. That's why I wanted to do a pre-check and let the user know about the lack of indicator.

 
Nauris Zukas:

Thank you. The script(EA) is for Market, so will have to go through the moderators. Due to the fact that the "cannot open file" error appears there, I am not sure that the moderators will let it through. That's why I wanted to do a pre-check and let the user know about the lack of indicator.

The indicator must be placed in the body of the EA file. There are resources for this:

Документация по MQL5: Программы MQL5 / Ресурсы
Документация по MQL5: Программы MQL5 / Ресурсы
  • www.mql5.com
В данном примере показано как проигрывать звуки из файлов Ok.wav и timeoit.wav, входящих в стандартную поставку терминала. Эти файлы находятся в папке означает папку, из которой запущен клиентский терминал MetaTrader 5.  Программным путем из mql5-программы каталог терминала можно узнать следующим образом: Расположение каталога данных терминала...
 
Artyom Trishkin:

The indicator must be placed in the body of the EA file. There are resources for this:

Thank you!

 

Hi, is there any other way to get an indicator buffer besides iCustom()?


 
Hi, can you tell me how can I call the dll-function when closing MT4? The matter is that in MT4 there is a constant work with dll, I need to call the function from it before closing the platform. If I close a chart without closing the program (charts) then DeInit doesn't work.
Reason: