Errors, bugs, questions - page 174

 
Olegts:
Thank you, I will check it in mt5

int CreateFile(string Path, string symbol, int Рrix);

What if I need to write text there?

 
Olegts:

int CreateFile(string Path, string symbol, int Рrice);

What if I need to write text there?

Put String or PChar (or whatever else you need to work with Unicode).

It all depends on the environment in which DLL is created and what this DLL will be.

It is better to make a set of functions for reading and writing to the file.

PS

Pay special attention to Path and symbol, they will be passed as Unicode, there may be problems with it.

 

You need to keep track of how long an order or position has been in the market.

More precisely:

1. Track how much time has elapsed from the time the order was placed until it was executed or cancelled.

2. trace how much time has passed from the moment the position appears (from the market or by order) until the position is liquidated. I am not interested in everything that has happened to the position at this moment.

Who has any ideas about it?

PS

Preferably from the trading history in the terminal.

 
Interesting:

You need to keep track of how long an order or position has been in the market.

More precisely:

1. Track how much time has passed from the time the order was placed until it was executed or cancelled.

2. trace how much time has passed from the moment the position appears (from the market or by order) until the position is liquidated. I am not interested in everything that has happened to the position at this moment.

Who has any ideas about it?

PS

Preferably from the trading history in the terminal.


i have an idea to simply subtract the closing time from the opening time and get the life time of the position.
Документация по MQL5: Стандартные константы, перечисления и структуры / Торговые константы / Свойства позиций
Документация по MQL5: Стандартные константы, перечисления и структуры / Торговые константы / Свойства позиций
  • www.mql5.com
Стандартные константы, перечисления и структуры / Торговые константы / Свойства позиций - Документация по MQL5
 
Olegts:

I found this code in the manual

everything works, question: how do I create a file to write in another convenient location?

The code doesn't work by entering an absolute path...

With standard functions all file operations are only in "sandbox". This, by the way, is what the help says.

 

Developers.

Please make accounts with 0.01 lots on your demo (if there are none at the moment).

Recalculating balance and lots is not an option... :(

 
Interesting:

Developers.

You may start working with 0.01 lots on your demo accounts (if you don't have them at the moment).

Recalculate the balance and lots is not an option... :(


You may register check at once for any min. lot and it will work for any brokerage company.

By the way, there are brokerage companies where the min lot is not 0.01 or 0.1 but 0.5 or 0.05, there are also variants when the min. lot is different from the step. lot.

If you do not have enough demo funds in the settings when opening an account, just put 100,000 or 1 yolam, and you will be happy.

 
Interesting:

Set up accounts with a 0.01 lot on your demo (if there aren't any at the moment).
Done.
 
Urain:

If you do not know why, you may register check for any min. lot and it will work for any brokerage company, or you may think of pushing the code to someone, he will complain to you that the code does not work in his environment.

By the way, there are brokerage companies where the min lot is not 0.01 or 0.1 but 0.5 or 0.05, there are also variants when min. lot is different from the step. lot.

If you do not have enough demo funds just put 100 000 or 1 million in the settings when opening an account and you will be happy.

I told you, the recalculation of balance and lots is not an option.

Although, it may have to be done in an extreme case. If I do not have enough problems with transferring trades to MT4, I will have to make additional calculations on this issue.

They also have a lot of trading robots in their accounts.

Renat:
We did it.

I am very happy about it.

PS

What will be the name of this account type?

Документация по MQL5: Стандартные константы, перечисления и структуры / Состояние окружения / Информация о счете
Документация по MQL5: Стандартные константы, перечисления и структуры / Состояние окружения / Информация о счете
  • www.mql5.com
Стандартные константы, перечисления и структуры / Состояние окружения / Информация о счете - Документация по MQL5
 
Interesting:

What will this account type be called?
For all demo accounts.
Reason: