Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 6. - page 650
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
If it's from a different chart, let it use a function variant with a chart identifier.
no problem either.
That's great! That was exactly the point. Thank you, dear comrade!
If it's from a different chart, let it use a function variant with a chart identifier.
No problem either.
As I understand it, the only options are ObjectGetDouble() for price and ObjectGetInteger() for date in my case.
I try to get the price in the current TF with chart_id = 0
- value as it should be. I tried both IDs and values from here https://docs.mql4.com/ru/constants/chartconstants/enum_timeframes instead of 0, but it returns 0. What should a "correct" chart_id look like?
As I understand it, the only options are ObjectGetDouble() for price and ObjectGetInteger() for date in my case.
I'm trying to get the price in the current TF with chart_id = 0
- value as it should be. I tried both IDs and values from here https://docs.mql4.com/ru/constants/chartconstants/enum_timeframes instead of 0, but it returns 0. What should a "correct" chart_id look like?
As I understand it, the only options are ObjectGetDouble() for price and ObjectGetInteger() for date in my case.
Trying to get the price in the current TF with chart_id = 0
what is 3?
- The value is as it should be. I tried both IDs and values from here https://docs.mql4.com/ru/constants/chartconstants/enum_timeframes instead of 0, but it returns 0. What should a "correct" chart_id look like?
you have an unrealistic hole in your understanding of what to use
Describe your problem, don't get too obscure and around the gut.
What do I need? To retrieve data from an object?
- ObjectGet Why didn't you like it?
what is 3?
The price value of the lower limit of the rectangle. https://docs.mql4.com/constants/objectconstants/enum_object_property
I have no idea how. That's why I'm trying to do it myself and ask, since I failed.
describe your task, don't get dark and groping around. what exactly do you need? get data from an object? - ObjectGet What's wrong with it?
Are you seriously asking? I've already written 3 times that I need to get rectangle data (2 price coordinates and two time coordinates used to build rectangles) from two other timeframes(H4 and D), while being on the third(H1).
ObjectGet is not suitable because it cannot receive anything from another timeframe.
The indicator draws rectangles on all timeframes and I have added code to it, it will transmit rectangle coordinates of other timeframes without switching to them. I don't know how to explain it any other way.
The value of the price of the lower limit of the rectangle. https://docs.mql4.com/constants/objectconstants/enum_object_property
I have no idea how. That's why I'm trying to do it by gut feeling and asking, because it didn't work.
Are you seriously asking? I've already written 3 times that I need to get rectangle data (2 price coordinates and two time coordinates to build rectangles on) from two other timeframes(H4 and D), while being on the third(H1).
ObjectGet is not suitable because I cannot get anything from another timeframe with it.
It draws rectangles on all timeframes and I am adding code to it, by which it will pass the coordinates of rectangles of other timeframes without switching to them. I don't know how to explain it any other way.
Understand that a different TF and a different chart or chart are different concepts and therefore different approaches to solving problems.
Thank you! Roger that. Except that with the OrderSelect error, it's not clear how to stop except tocontinue.
Deleted late message, did almost the same as described.
Sometimes you can combine return value and error sign. When it makes sense to take some value as a sign of error. For example, an averaging price equal to 0.
Then, as soon as OrderSelect() returns a sign of error, our function will return a sign of error:
Run it on my own, I got it:
It seems to be true...
Yes, I did not use a conditional expression in Print() to avoid hypothetical division by 0 because this Print() is a debug one...
As I understand it, the only options are ObjectGetDouble() for price and ObjectGetInteger() for date in my case.
I try to get the price in the current TF with chart_id = 0
- value as it should be. I have tried IDs and values from here https://docs.mql4.com/ru/constants/chartconstants/enum_timeframes instead of 0, but it returns 0. What should a "correct" chart_id look like?
.roman.:
I am only glad to understand and accept any solution, if you have ideas. That is why I am asking for advice on how to implement it.
Here's how chart_id ChartFirst ChartNext should look like
Use ChartNext ChartSymbol and ChartPeriod to determine if it is the right chart and use this chart_id.