Try place yourself in our shoes. How would you answer your own question?
Did you provide your example code for us to be able to analyse and point out problems?
If others are able to use the functions, then surely it works. If it does not work for you, then you must be doing it incorrectly.
But how are we going to know what you are doing wrong if we cannot see your code, or your computer or read your mind?
In other words, if you truely want help, then you have to be as detailed as possible with your question.
Try place yourself in our shoes. How would you answer your own question?
Did you provide your example code for us to be able to analyse and point out problems?
If others are able to use the functions, then surely it works. If it does not work for you, then you must be doing it incorrectly.
But how are we going to know what you are doing wrong if we cannot see your code, or your computer or read your mind?
In other words, if you truely want help, then you have to be as detailed as possible with your question.
Okay, I will give you the code and the details. I appreciate your attention. Thanks.
You are using the functions incorrectly. The two functions iHighest and iLowest return an index or bar-shift, not the actual quote prices themselves.
Please read the documentation again, and have a look at the example code there.
Returns the index of the highest value found on the corresponding chart (shift relative to the current bar)
Returns the index of the smallest value found on the corresponding chart (shift relative to the current bar)
Here is another example ...
int nHighest = iHighest( _Symbol, _Period, MODE_HIGH ); nlowest = iLowest( _Symbol, _Period, MODE_LOW ); double highest = iHigh( _Symbol, _Period, nHighest ), lowest = iLow( _Symbol, _Period, nlowest );
Your code also has several other problems, but I will leave up to you to analyse it properly.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use