[ARCHIVE!] Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Can't go anywhere without you - 4. - page 214
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
Hi folks, I haven't been here in a while (1.5 years) could you refresh my memory a little?
My point is that with the help of Expert Advisors the orders were placed with t/p and s/l. Now I want to close the necessary orders without them.
Warrants.
here is the code
int clos(int mn)
{ int k=OrdersTotal();
for(int a=0;a<=k;a++)
{ if(OrderSelect(a,SELECT_BY_POS,MODE_TRADES))
{ if(OrderMagicNumber()==mn)
{ if(OrderType()==OP_BUY || OrderType()==OP_SELL)
int n=OrderTicket();
double l=OrderLots();
OrderClose(n,l,Ask,5,0);
}}}
return(0);
}
I don't close any order, I passed all of them, what's wrong?
Good afternoon.
Can you help me to complete this code, I need to memorize this bar when Spread is equal to zero.
and then control the Spread. if it is greater than a certain value open a deal.
int razdvizka =20;
int Price1, Price2, Spread;
for (int m=1;m<Bars;m++)
{
Price1 =(iClose(Symbol_1,0,0) - iClose(Symbol_1,0,m)) / MarketInfo(Symbol_1, MODE_POINT);
Price2 = K*(iClose(Symbol_2,0,0) - iClose(Symbol_2,0,m)) / MarketInfo(Symbol_2, MODE_POINT);
Spread = Price1 - Price2;
if (Spread==0) {......... }
}
Price1 = (iClose(Symbol_1,0,0) - iClose(Symbol_1,0,m)) / MarketInfo(Symbol_1, MODE_POINT);
Price2 = K*(iClose(Symbol_2,0,0) - iClose(Symbol_2,0,m)) / MarketInfo(Symbol_2, MODE_POINT);
Spread = Price1 - Price2;
if (Spread> razdvizka ) { open trade }
Hi.
Could you please tell me if mql4 has http upload functions?
if so, what kind of functions?
Hello Gentlemen)) The situation is as follows,
the signal "sig1" triggers the command BAY and sets a pending order SELLSTOP below the order BAY.
When I close a BAY position, the SELLSTOP is also deleted.
What happens when the BAY has not been closed and the next BAY has been opened, and so on.
This SELLSTOP which is set first has to be calculated in order to perform any operation with it.
Hi.
Could you please tell me if mql4 has http upload functions?
If so, what kind of functions?
not directly...
you can only SendMail() - either a letter to a mailbox.
Sending may be prohibited in the settings, also the email address may not be specified. The GetLastError() function should be called to get the error information.
or file via ftp
The function doesn't work in test mode. This function also cannot be called from the custom indicators.
The file to be sent must be located in the terminal_directory\experts\files folder or its subfolders.
Sending is not performed if no FTP address and/or access password is specified in the settings.
----
But - no one is stopping you to write such a function in another programming language (which you need) and use it in a DLL.
not directly...
You can only send information - either a letter to a mailbox
Sending may not be allowed in the settings, also the email address may not be specified. The GetLastError() function should be called to get the error information.
or file via ftp
The function doesn't work in test mode. This function also cannot be called from the custom indicators.
The file to be sent must be located in the terminal_directory\experts\files folder or its subfolders.
Sending is not performed if no FTP address and/or access password is specified in the settings.
----
But - no one is preventing you, in another programming language, write such a function (which you need) and use it in a DLL
Thanks for the tip, but these functions send info/file, not receive
I'm just trying to avoid it, it's too far for my brain to handle.
It is interesting, for example, the Urdala_News indicator shows time of news releases and has a dll import, but no dll file was added to sq4 file of the indicator.
Hi.
could you please tell me if mql4 has http upload functions?
If so, what kind of functions?
Through wininet.dll, see how it is done here.
Do you mean the functions
UPD read your previous post - wininet.dll is a standard Windows library, so don't worry about its presence in the system.
Hello Gentlemen)) The situation is as follows,
the signal "sig1" triggers the command BAY and sets a pending order SELLSTOP below the order BAY.
When I close a BAY position, the SELLSTOP is also deleted.
What happens when the BAY has not been closed and the next BAY has been opened, and so on.
This SELLSTOP which is set first has to be calculated in order to perform any operation with it.
Good day!
I tried to write an EA recently, everything turned out almost normal, opens transactions by time.
The problem now is the time, for example, need to open a deal at 8 34 and the bar is not, looked at the minute goes first 8 33 then immediately 8 35, analyzed another chart, I noticed that some of the minutes just as there.
Please advise how to reopen the position in a minute, etc., until 1 trade opens.
If you would like to reply to aksa33@mail.ru, thank you very much.