Questions from Beginners MQL5 MT5 MetaTrader 5 - page 1537
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
What formula is used to calculate SYMBOL_PRICE_VOLATILITY?
Is this not satisfactory?
Regards, Vladimir.
Wouldn't that be okay?
Regards, Vladimir.
Thank you. Coefficient of price change per day. I understand. But for scalping I would like to have a flexible tool to determine volatility to compare it with spread for example.
SYMBOL_PRICE_VOLATILITY was added in 2020. Is the formula not known? The search engine doesn't show it...Well, I wrote about incorrect bid ascii in position openings in the previous post.
I corrected the opening conditions, and the problem of closing positions was solved. :)) I did not understand why it was so. But your advice solved the problem. Thanks again.
... But for scalping, one wants to have a flexible tool to determine volatility to compare it with the spread, for example.
SYMBOL_PRICE_VOLATILITY was added in 2020. Is the formula not known? The search engine doesn't show it...What prevents you from inserting thespread instead of the session opening price? It can be easily obtained using SymbolInfoInteger(_Symbol, SYMBOL_SPREAD) and multiplied by SymbolInfoDouble(_Symbol, SYMBOL_POINT).
Regards, Vladimir.
What prevents you from inserting thespread instead of the session opening price? It can be easily obtained using SymbolInfoInteger(_Symbol, SYMBOL_SPREAD) and multiplied by SymbolInfoDouble(_Symbol, SYMBOL_POINT).
Regards, Vladimir.
Thank you for your reply. Perhaps I just don't understand what should be obtained then. Spread coefficient? The spread is already there. Current value. Volatility is problematic. I tried to write the code to get the volatility, it turned out to be very stretched. So I didn't finish it. And if the function for volatility, which I am asking about, would work, it would be much easier.
So far it does not open positions.
Thanks for the reply. Perhaps I just don't understand what should be the result then. Spread factor? The spread is already there. Current value. Volatility is problematic. I tried to write the code to get the volatility, it turned out to be very stretched. So I didn't finish it. But if the function for volatility, which I am asking about, would work, it would be much easier.
So far it does not open positions.
I assume that this EA will never open positions under these conditions. It seems that the PerVolatiliti variable is always equal to zero.
Regards, Vladimir.
Also. Frankly speaking, I don't understand the condition under which a position should be opened. How can spread and volatility be compared at all? )) I guess I don't know or understand something else.
Regards, Vladimir.
I assume that this EA will never open a position under these conditions. It seems that the PerVolatiliti variable is always equal to zero.
Regards, Vladimir.
Regards, Vladimir.
Thank you. Do you think this is a bug, or did I do something wrong?
I don't know what it is, but try to get the SYMBOL_PRICE_VOLATILITY volatility value 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 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 value of volatility or not. I am 100% sure that you will not get any volatility value greater than zero.