Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 721

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
I understand correctly:
Before opening each trade, you need to check all trades on this symbol with this magician and if the last trade on the date with a loss, respectively increase the lot?
What is the correct way to do a martingale?
I understand correctly:
Before opening each trade, you need to check all trades on this symbol with this magician and if the last trade by date is at a loss, respectively increase the lot?
It's like this
It's like this
just don't understand how to calculate the most recent transaction out of all of them
I just don't understand how to calculate the most recent transaction out of all of them
It goes something like this.
Folks, has anyone come across, I need to get indicator data based on another indicator, e.g. RSI superimposed on RSI.
All sorted out, the question is no longer relevant
I just don't understand how to calculate the most recent one out of all the trades
Sorry, the last example selects among open, among closed it should be like this
Strange behaviourof iBarShift(). Returns index (-1) withexact =false flag explicitly checked.
Error occurs randomly at any time, there is no way to catch it manually.
On getting a negative index the code writes in the console the parameters of the executed request and the result
Request - the time when the bar index is requested
TimeLastTick is the time of the last tick for the requested symbol;MqlTick[] is taken right after the error.
What could be the reasons for such behavior, maybe someone has encountered it?
Strange behaviourof iBarShift(). Returns index (-1) withexact =false flag explicitly checked.
Error occurs randomly at any time, there is no way to catch it manually.
On getting a negative index the code writes in the console the parameters of the executed request and the result
Request - the time when the bar index is requested
TimeLastTick is the time of the last tick for the requested symbol;MqlTick[] is taken right after the error.
What may be the reasons for such behavior, maybe someone has encountered?
What does it say in the documentation about exact == false ?
Returned value if no bar was found at the specified time. Ifexact=false iBarShift returns index of the nearest bar with open time less than specified (time_open<time). If such a bar is not found (no history before the specified time), the function will return -1.
But we have history, it is a fact. Everything happens at the newest (0-th by time series) bar.