Questions from Beginners MQL5 MT5 MetaTrader 5 - page 1082

 
Igor Makanu:

You have the wrong idea about the online community, just like none of the admins can say that this forum does not provide help to those who are interested in MQL programming from scratch

SZZY: I don't recall a case where at RSDN or Stack Overflow and the other online programming communities, instead of an answer would offer to ask for services, if the person asking for an explanation of how something works, and not asking where to buy (order)

Here are the key words. If he asked how and didn't quite understand the answer, it's okay to continue. But when they ask like "you do it for me"... that's something else entirely.

This post is an example of a programmer's willingness to understand rather than use someone else's work.

 
Igor Makanu:

You have the wrong idea about the online community, just as none of the admins can say that this forum does not provide help to those who are interested in MQL programming from scratch

SZZY: I don't recall a case where at RSDN or Stack Overflow and the other online programming communities, instead of an answer would offer to ask for services, if the person asking for an explanation of how something works, and not asking where to buy (order)

There was no request to explain. There was a request to give. Find it in CodeBase for him and point the finger.

 
Artyom Trishkin:

There was no request to explain. There was a request to give. Find it in CodeBase and point the finger.

Was there a question about where to order or pay? I don't think so, but it should have been stated that there is a KB, but there is also a search line .... search for yourself, if you have any technical questions, feel free to ask...

or just ignore the message as irrelevant to the topic of the topic, imho.

ok, it's empty .... I don't want to break a tradition on the forum, the forum works in this mode, so it's necessary

 
No need to swear - tomorrow there will be an Expert Advisor based onMQL5\Experts\Examples\MACD\MACD Sample.mq5- in fact, these are separate signals for opening and closing of a position: i.e. a signal for BUY opening does not automatically meanSELL closing.
Signal to open BUY position A signal to open a SELL position
(MACD main#0 < 0.0) &&  
(MACD main#0 > MACD signal#0) && 
(MACD main#1 < MACD signal#1) && 
(Abs(MACD main#0) > MACD open level) && 
(EMA#0 > EMA#1)
(MACD main#0 > 0.0) &&  
(MACD main#0 < MACD signal#0) && 
(MACD main#1 > MACD signal#1) && 
(MACD main#0 > MACD open level) && 
(EMA#0 < EMA#1)
A signal to close a BUY position A signal to close a SELL position
(MACD main#0 > 0.0) &&
(MACD main#0 < MACD signal#0) && 
(MACD main#1 > MACD signal#1) &&
(MACD main#0 > MACD close level)
(MACD main#0 < 0.0) &&
(MACD main#0 > MACD signal#0) && 
(MACD main#1 < MACD signal#1) &&
(Abs(MACD main#0) > MACD close level)

Trade signals are received only at the moment when a new bar is born.

 
Vladimir Karputov:
No need to swear - there will be an expert tomorrow ...

The wisest decision so far

 

A word of advice to a dummie ...

In mql4 output value of variable in Expert Advisor as :

Print("_PV_", DoubleToStr(PVV,1));

How to output it in mql5 ?

Thank you.

 
procomK:

A word of advice to a dummie ...

In mql4 output value of variable in EA:

Print("_PV_", DoubleToStr(PVV,1));

How to output such a value in mql5 ?

Thank you.

Use this:

Print("_PV_", DoubleToString(PVV,1));

Help:DoubleToString

 
Thank you.
 
procomK:
Thank you.

It's strange that you haven't noticed the presence of DoubleToString() in MQL4 for many years, and are using its old version DoubleToStr().

Документация по MQL5: Преобразование данных / DoubleToString
Документация по MQL5: Преобразование данных / DoubleToString
  • www.mql5.com
[in]  Формат точности. Если значение digits лежит в диапазоне от 0 до 16, то будет получено строковое представление числа с указанным количество знаков после запятой. Если значение digits лежит в диапазоне от -1 до -16, то...
 
Artyom Trishkin:

It's strange that you haven't noticed the presence of DoubleToString() in MQL4 for many years, and are using its old version DoubleToStr().

I've noticed that not a few programmers and programmers on purpose don't use mql5 compatible functions.

Reason: