Questions from Beginners MQL5 MT5 MetaTrader 5 - page 1538

 
MrBrooklin #:

I don't know what it is, but try to get the value of SYMBOL_PRICE_VOLATILITY volatility on your terminal. It is done very simply. Create a new Expert Advisor and print the value of volatility on each tick. Run this Expert Advisor, let's say, from the beginning of this year until today's date. For example, on my terminal the volatility is always equal to zero. And then see what is set in the conditions of the Expert Advisor Perevertysh20240508.mq5. How can it be fulfilled if the volatility is always equal to zero?

Regards, Vladimir.

P.S. Here is a ready version of the Expert Advisor. Run it on your terminal and look in the Journal tab of the tester - it will display at least one volatility value or not. I am 100% sure that you will not get any volatility value greater than zero.

Thank you. Then it is all the more necessary to see the formula. How do I find it in the documentation? So far, this is all I've been able to find: https://www.mql5.com/ru/docs/constants/environment_state/marketinfoconstants. And there's no formula. Maybe some parameter is missing....

Документация по MQL5: Константы, перечисления и структуры / Состояние окружения / Информация об инструменте
Документация по MQL5: Константы, перечисления и структуры / Состояние окружения / Информация об инструменте
  • www.mql5.com
Для получения текущей рыночной информации служат функции SymbolInfoInteger() , SymbolInfoDouble() и SymbolInfoString() . В качестве второго...
 
maxvoronin74 #:

Thank you. Then all the more reason to see the formula. How do I find it in the documentation? So far, this is all I've been able to find: https://www.mql5.com/ru/docs/constants/environment_state/marketinfoconstants. And there's no formula. Maybe some parameter is missing....

Most likely, MetaQuote will never provide you with this formula. And what to do now? I think that we should go not head-on, but in a different way. If you find a clear definition of volatility on the currency market, it will not be difficult to write its formula. Here is what the browser gave out on a search engine query for the formula of volatility of the currency market:

  1. Volatility- Wikipedia (wikipedia.org)
  2. Currency volatility - in simple words - Financial Journal - Finam.ru (finam.ru)
  3. Forex Volatility Calculator - Investing.com

And I found some more information on AlfaBank's website: "What indicators are used to measure market volatility? Volatility indicators, such as ATR (Average True Range) and Bollinger Bands, help traders measure and analyse market volatility to make decisions about trading strategies". Then, what prevents you from opening, for example, the code of the ATR indicator and taking this formula from its calculation part?

Regards, Vladimir.

 
There are already 100500 posts about volatility.... Get an ATR indicator and you will be happy )
 
Artyom Trishkin #:
There are already 100500 posts about volatility.... Get an ATR indicator and you will be happy ).

Good morning, Artem. That's the point, he only needs a formula or, if I understood the question correctly, a ready-made function to insert into the code of his EA, not an indicator. Hence all these fiddles. ))

Regards, Vladimir.

 
MrBrooklin #:

Good morning, Artem. That's the point, he only needs a formula or, if I understood the question correctly, a ready-made function to insert into the code of his EA, not an indicator. Hence all these fiddles. ))

Regards, Vladimir.

Good. Let me expand: take ATR and see the calculation.
 
Artyom Trishkin #:
Okay. Let me expand: take ATR and look at the calculation.

"Dear" Vladimir, you're still submitting to "Articles" publications.

Isn't it funny yourself?

 
maxvoronin74 #:
SYMBOL_PRICE_VOLATILITY was added in 2020. Is the formula not known? The search engine doesn't show it...

I'll try to figure out again what the author of this post wants. If I understood correctly, he wants to get the current market information using the SymbolInfoDouble() function. As the second parameter he specifies an identifier from the ENUM_SYMBOL_INFO_DOUBLE enumeration, namely SYMBOL_PRICE_VOLATILITY, and expects to receive this value from his broker's server. If this is indeed the case, it is not a fact that he can get this value.

I have already encountered a similar question (problem) and it was explained to me on the Forum that a request with the identifier I specified may not always have an answer.

Now I have a counter question to the author of the message - why are you looking for the formula exactly on the MQL5 website and why should it be here and not with the broker, who should give an answer to the requested information?

Also. Artem is absolutely right when he suggested using the ATR indicator. It will be the simplest solution to the problem.

Regards, Vladimir.

 
Artyom Trishkin #:
Okay. Let me expand: take the ATR and see the calculation.

Artyom, didn't my post before yours say the same thing? I quote: "Then what prevents you from opening, for example, the code of theATRindicator and taking this formula from its calculation part?"? ))

Regards, Vladimir.

 
I need ur help to start coz am new hea
 
MrBrooklin #:

Artyom, didn't my post before yours say the same thing? I quote: "Then what prevents you from opening, for example, the code of theATRindicator and taking this very formula from its calculation part?" ))

Regards, Vladimir.

I haven't seen it. I read by ear, probably....
Reason: