Questions from Beginners MQL4 MT4 MetaTrader 4 - page 138

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
Yes of course you can!!!
Hi guys. Can you advise someone who is perfectly familiar with programming?
I create a horizontal line under certain conditions. I define a price with OLB in order to use OpenlineB in another code as the price of the horizontal line. In another code where it is needed it is displayed as an integer. For example the price is 110,256 and it shows 110. I found this out with Comment. Why is the exact price not displayed, what is the problem?
Hi guys. Can you advise someone who is perfectly familiar with programming?
I create a horizontal line under certain conditions. I define a price with OLB in order to use OpenlineB in another code as the price of the horizontal line. In another code where it is needed it is displayed as an integer. For example the price is 110,256 and it shows 110. I found this out with Comment. Why is the exact price not displayed, what is the problem?
Your function returns an integer number. What you get is what is printed.
And of course, further on in the function you convert it to double format.
Your function returns an integer. What you get is what is printed.
And of course, further in the function you convert it to double format.
Already tried it. It returns an integer.
Your function returns an integer. What you got is what you printed.
And of course, further in the function you convert it to double format.
I got it!!! Thank you dear Konstantin!!!!!!!!!!!!!!!!!!
Already tried it. It comes out as an integer.
Try using ObjectGetDouble
And change the function declaration to
double OpenlineB() {
Try using ObjectGetDouble
All done!
Thank you!!!
All done!
Thank you!!!
Can I truncate it a bit?
You could truncate it a bit.
otherwise indicator data is called from cache at every access
And it would be better to keep the level of "BUY" line in your variables and not look for it on the chart.