Questions from Beginners MQL5 MT5 MetaTrader 5 - page 170
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
Look in the indicator code, OnCalculate() function.
Doing the following:
Nothing works. Everything is clear in MQL4. I do not know MQL5 very well. I guess some functions should be called to get the price?I do as follows:
Nothing works. Everything is clear in MQL4. I don't know MQL5 very well. Perhaps, some functions have to be called to get the price?Write in OnInit:
I do as follows:
Nothing works. Everything is clear in MQL4. I don't know MQL5 very well. Maybe, some functions have to be called in order to get the price?You can use CopyRates (similar to CopyBuffer) to access the price history.
The current Ask, Bid prices can be obtained using SymbolInfoTick or SymbolInfoDouble (as in Spread indicator).
Write in OnInit:
You can use CopyRates (similar to CopyBuffer) to access price history. The current values of Ask, Bid prices can be obtained using SymbolInfoTick.
Nothing works. Here's all the code:
Nothing works. Here's all the code:
Why not? It's working for me:
I don't see why not. It works for me:
Visually, at first glance, it looks right. But when I recalculate the difference between the price and the moving average I get a completely different figure.
I checked on EURUSD/1.36421-1.36168=0.00253, and the indicator shows 0.00157.
Good afternoon.
Is there anywhere ready-made function codes in MQL5 language, like KimIV had in MQL4 http://forum.mql4.com/ru/38949 ?
Visually, at first glance, it looks right. But, having recalculated the difference between the price and the moving average, we get a completely different figure.
I checked on EURUSD/1.36421-1.36168=0.00253, and the indicator shows 0.00157 Screenshot attached.
Good afternoon.
Is there anywhere ready-made function codes in MQL5 language, like KimIV had in MQL4 http://forum.mql4.com/ru/38949 ?