Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Our community is a completely independent place for communication between forex traders and software developers for trading platforms Metatrader 4 and Metatrader 5
Create A New Account
Input parameters (which are set by the user)
prostotrader
Pavel Kolchin: very little information, or very limited functionality?how can I offer the user a set of input parameters more flexibly?for example, I need if the user selects p1 = true, then allow to specify p2 and p3 and p4, if the user selects p1 = false, then prohibit filling in other fieldsWhy iRead more
Why in input?
Just set global variables and subtract data from your file.
See lessCreating an array class based on historical order data, what’s wrong
prostotrader
if(HistorySelect(start,end)) { }The first mistake
if(HistorySelect(start,end))
{
}
The first mistake
See lessNot possible to set the expiration of the order.
prostotrader
nx0x2: Returns the value 10, in the tablature (flags of allowed modes) I did not find anything on this topicWrite what you want to do (for how long to set the order)?A value of 10 means that this symbol supports 2 types of expirationSYMBOL_EXPIRATION_DAY and SYMBOL_EXPIRATION_SPECIFIED_DAYAddedIe EXRead more
Write what you want to do (for how long to set the order)?
A value of 10 means that this symbol supports 2 types of expiration
SYMBOL_EXPIRATION_DAY and SYMBOL_EXPIRATION_SPECIFIED_DAY
Added
Ie EXPIRATION_SPECIFIED_DAY You can place an order before the first clearing on the day you set,
and SYMBOL_EXPIRATION_DAY – to the nearest clearing
See lessdeleting pending orders
prostotrader
klok44: Is there anything like this (script / / expert Advisor) when there are many pending orders on different currency pairs, and when two of them are triggered, for example, the rest are closed (preferably MQL5)?What does the site SEARCH say?
What does the site SEARCH say?
See lessHow to transfer a working expert Advisor from MT5 to QUICK.
prostotrader
Alexey Volchanskiy: cool, 15 years Delfu did not feel ))Lesh, what difference does it make on what to write? Just XE4 I have a license and 64-bit. I got it on occasion.
Lesh, what difference does it make on what to write?
Just XE4 I have a license and 64-bit.
I got it on occasion.
See lessHow to transfer a working expert Advisor from MT5 to QUICK.
prostotrader
a18psrock: Hello, I have been developing robots on MQL5 for a long time. I want to move some of my robes to QUICK. I don't like this platform at all and have never written for it. How to start learning? Are there any professionals here who also program for QUICK and were engaged in translating expeRead more
Give up this idea, because even if you write something on QLUA, you will not be able to test it.
The only way out is data output via the DDE server and transactions via trans2quik.dll
See lessHow do I learn mql5 on my own?
prostotrader
Fredrixon: Hello, good people. I'm a complete beginner in writing robots, but I'm a bit of a trader and now I want to robotize my strategy. I don't want to hire freelancers, but I need to get into this kitchen of programmers myself. Can you tell me what language I should learn?(mql4 or mql5) In whatRead more
It’s very simple.
Every programming language has procedures and functions.
Procedures do not return anything, but simply perform a set of any operations,
and functions return the results of operations. A program (adviser) consists of a set of procedures and functions.
An example of a function:
int TestFunction(const int param_1, const int param_2 )
{
return(param_1+param_2);
}
Sample procedure:
void TestProcedure()
{
c=a+b;
}
Both functions and procedures are passed parameters that can be operated on
procedures and functions. Parameters can be return values.
They can be returned by both functions and procedures.
You just need to learn the syntax of the language and the types of variables.
See lessNumber of variables in MQL5
prostotrader
Sergey Savinkin: How do I write an ini file? Where should it be stored and what is its structure?long test_1, test_2, test_3; //+------------------------------------------------------------------+ //| Expert Save settings function | //+-----------------------------Read more
See lesslong test_1, test_2, test_3;
//+------------------------------------------------------------------+
//| Expert Save settings function |
//+------------------------------------------------------------------+
void SaveSettings()
{
string file_name = Symbol() + ".dat";
int file_handle;
file_handle = FileOpen(file_name, FILE_WRITE|FILE_BIN);
if(file_handle != INVALID_HANDLE)
{
if(FileSeek(file_handle, 0, SEEK_CUR) == true)
{
FileWriteLong(file_handle, test_1);
FileWriteLong(file_handle, test_2);
FileWriteLong(file_handle, test_3);
}
FileClose(file_handle);
}
}
//+------------------------------------------------------------------+
//| Expert Load setings function |
//+------------------------------------------------------------------+
void LoadSettings()
{
string file_name = Symbol() + ".dat";
int file_handle;
if(FileIsExist(file_name, 0))
{
file_handle = FileOpen(file_name, FILE_READ|FILE_BIN);
if(file_handle != INVALID_HANDLE)
{
test_1 = FileReadLong(file_handle);
test_2 = FileReadLong(file_handle);
test_3 = FileReadLong( file_handle );
FileClose(file_handle);
}
}
Pending order on MQL5
prostotrader
Pending order on MQL5Is there an order that will not work immediately, but will be located in the glass?
Pending order on MQL5
Is there an order that will not work immediately, but will be located in the glass?
See lessControl of the strategy in the expert Advisor.
prostotrader
Aliaksandr Hryshyn: I wonder how you control the operation of the strategy in the expert Advisor, I mean program control in the expert Advisor itself.TS is the algorithm that the expert Advisor uses, as "you will harness, so you will go".
TS is the algorithm that the expert Advisor uses,
as “you will harness, so you will go”.
See less