Questions from Beginners MQL4 MT4 MetaTrader 4 - page 120
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
Yeah, I can see that. And I see the answer to the question in the post belowhttps://www.mql5.com/ru/forum/160587/page115#comment_6521492. In other words, the problem is that the functionality is not divided into logical subtasks. You have lumped together: parsing orders, deciding on a trade action and executing a trade.
Such a task can be solved exactly in three stages:
Well, thank you. At least it's clear what to do. I'll try to figure out "how" to do it myself. Although I'm not familiar with arrays yet. Thanks again anyway.
Tell me how to get out of this !!!
for(int i=OrdersTotal()-1; i>=0; i--)
{
OrderSelect(i,SELECT_BY_POS);
if(OrderMagicNumber()==Magic && OrderType()==OP_SELL)
break;
The warning is: the return value of 'OrderSelect' must be checked
Howelse shouldthis'OrderSelect'valuebe checked?
if I do this: j=OrderSelect(); Is this correct?
Tell me how to get out of this !!!
for(int i=OrdersTotal()-1; i>=0; i--)
{
OrderSelect(i,SELECT_BY_POS);
if(OrderMagicNumber()==Magic && OrderType()==OP_SELL)
break;
The warning is: the return value of 'OrderSelect' must be checked
Howelse shouldthis'OrderSelect'valuebe checked?
if I do this: j=OrderSelect(); Is this correct?
It didn't work!(
string s=FileReadString(F1); // Read the next line of the text file
StringSplit(s, "," , a); // Split comma-separated elements into array
datetime T1=StrToTime(a[4]); // Further, transformation proceeds ...
int ord=StrToInteger(a[8]);
double Price=StrToDouble(a[12]);
Well, thank you. At least it's clearer what to do. I'll try to figure out the "how" myself. I'm not familiar with arrays yet, though. Anyway, thanks again.
Write at least one block and show me. They'll tell you further in this case.
Didn't work!(
Read it carefully, again.
All code will look like this
It didn't work!(
So you haven't done anything. You wrote it above:
And you have it written without checking. Although it would look more readable that way:
@Ihor Herasko @Alekseu Fedotov
THANK YOU!!! IT WORKED THAT WAY!