Errors, bugs, questions - page 1612

 
vodoleyvl:

Dear Sirs!

MT4 has a very handy drag-and-drop method of setting stop orders: when I drag the cursor away from the trade line, I can immediately see the profit that will be made if the trade closes at the price at which the cursor is positioned.

In my trading, I use a strategy where I often need a similar tool, but not for a single trade, but for ALL trades opened on a given chart.

That is. I would like. that when I set the cursor on any price, I would like to see the size of the AMOUNT OF PROFIT, which will be if ALL trades are closed at the price at which the cursor is set.

And it would be quite luxurious if, when I release the mouse button, all open trades were automatically set to the correct TP and SL for that profit, as is currently the case for a single trade.

Maybe I want too much, but I have described an ideal situation. At a minimum I want a calculator that inputs levels and volumes of open trades (all trades are unidirectional, either all sell or all buy) and closing price, and outputs the total profit to be made after closing all trades when a given price is reached. Or, for example, it could be an indicator in the form of ahorizontal line which shows the price at which the group profit will be zero at closing. I am currently calculating it by hand with a calculator but it is very long and may cause errors.

I would look on the Market myself, but I don't know what to look for. Should it be an Expert Advisor, an indicator, a robot or something else? If there is no such a tool ready-made, I am ready to discuss the terms of an order for writing such a tool.
The MQL programming language will help you, it implements all your whims.
 
Vladimir Zubov:
MQL programming language to help you, all whims are implemented.
The answer is trivial. I'm asking because I don't want to learn another language for the sake of one whim. And it seems that the whim is necessary to many people - hasn't anyone else written such a thing?
 
vodoleyvl:

I would look on the Market myself, but I don't know what to look for. Should it be an adviser, an indicator, a robot or something else? If there isn't anything like that ready-made, I'd be willing to discuss the terms of an order to write such a tool.

Expert Advisor (aka robot). Contact Freelance, they will do it for $30.
 
FileGetInteger(file_name,FILE_CREATE_DATE,false); always returns -1...
 
Vladimir Pastushak:
FileGetInteger(file_name,FILE_CREATE_DATE,false); always returns -1...
Doesn't reproduce. Describe in more detail, please.
 
Alexander:
It does not work. Please describe it in more detail.

I've figured it out, the documentation everywhere talks about the file name but doesn't say anything about the path.

When specifying a file name somewhere, if the path is different then it needs to be specified correctly in the name...

 

It is somewhat inconvenient when you select an expert in the strategy tester from the drop-down list.

Then you compile the code of that Expert Advisor.

As a result, it disappears in the dropdown list in the Strategy Tester and is replaced by some Moving Average.ex5.

Thus, I have to select it every time after compilation.

 
Hello. Could you please tell me if there is an analogue of iBarShift function from mql4 in mql5 language? The function returns the bar index by time
 
Aleksandr Teleguz:
Hello. Could you please tell me if there is an analogue of iBarShift function from mql4 in mql5 language? The function returns the bar index by time
No. Please write it yourself. You can see an example here: https://www.mql5.com/ru/articles/81
Переход с MQL4 на MQL5
Переход с MQL4 на MQL5
  • 2010.05.11
  • Sergey Pavlov
  • www.mql5.com
Данная статья, построенная в форме справочника по функциям MQL4, призвана помочь переходу с MQL4 на MQL5. Для каждой функции языка MQL4 приведено описание и представлен способ ее реализации на MQL5, что позволит вам значительно ускорить перевод своих программ с MQL4 на MQL5. Для удобства функции разбиты на группы, как в документации по MQL4.
 
I have noticed that the indicator, which is in the EA resources, slows down the testing of the EA, comparing to the same indicator, but its data is taken through iCustom()
This is not good for the marketplace.
I noticed this behaviour in mql4. I have not tested it in mql5.