[WARNING CLOSED!] Any newbie question, so as not to clutter up the forum. Professionals, don't go by. Can't go anywhere without you. - page 345

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
OrderSelect (0,SELECT_BY_POS, MODE_HISTORY) - selects the last order in the history
OrderSelect (1,SELECT_BY_POS, MODE_HISTORY) - the last but one order
accordingly, you can find out OrderProfit() for each of them
many thanks
Please advise what caused the error and how to deal with it, occurs in the tester's log:
19:20:11 TestGenerator: unmatched data error (low value 1.3676 at 2009.05.13 00:00 and price 1.3676 mismatched)
19:20:11 TestGenerator: unmatched data error (high value 1.3696 at 2009.05.13 01:00 and price 1.3696 mismatched)
19:20:11 TestGenerator: unmatched data error (high value 1.3700 at 2009.05.13 02:30 and price 1.3700 mismatched)
19:20:11 TestGenerator: unmatched data error (high value 1.3700 at 2009.05.13 03:30 and price 1.3700 mismatched)
I tried deleting prices and uploading again, maybe I'm doing something wrong, everything seems to be fine in the code.
Let me rephrase the question. Where can I get a good history or where can I read about it?
First of all, learn to answer correctly. Comments like yours are of no use to anyone.
The error was returned by GetLastError() after running iTime(). Here's a sample code...
Actually the last one is OrderSelect(OrdersHistoryTotal()-1,SELECT_BY_POS, MODE_HISTORY)
Yes, that's right, I've already answered it myself in the same thread :))) https://www.mql5.com/ru/forum/111497/page227#204964
The error was returned by GetLastError() after running iTime(). Here's a sample code...
Tested.
While executing the init() function, the new symbol data may be (and obviously are) not available yet. Hence the error. There is only one way to fight it - do not try to analyze data in the init() function.
Tested.
During init() execution, the new symbol data may be (and obviously is) not yet available. Hence the error. There is only one way to fight it - do not try to analyze data in the init() function.
Thanks, but is there a guarantee that the data will be available in start()?
Looking for a script or indicator to see the distribution of tick volume directly on the bar.
like in this picture from the branch Have you seen this picture?
Good afternoon, could you please tell me
if(OrderSelect(0, SELECT_BY_POS,MODE_HISTORY)==true)
{
double x=OrderProfit();
Print("last ",x);
}
I need the profit of the last closed order but it is the very first one.
Good afternoon please advise
if(OrderSelect(0, SELECT_BY_POS,MODE_HISTORY)==true)
{
double x=OrderProfit();
Print("last ",x);
}
I need a profit of the last closed order but it is the very first one, what is wrong in the code?
Above...
https://www.mql5.com/ru/forum/111497/page345#245944