Script to list the drawdowns of open positions

MQL5 스크립트

작업 종료됨

실행 시간 2 일

명시

Summary

This function will extract a snapshot of the data needed to identify the drawdown of individual EA’s.

 

The idea is to use the standard Metatrader toolbox trade data to obtain a snapshot of the open profit or loss for each open position along with the magic number associated with the position.

 

Building up a series of these over time will give an idea of the drawdown experienced by individual EA’s.

 

The function will create a regularly produced CSV files and place them in the existing MLQ5 Shared Projects folder.

Requirements

 

Changing the frequency of how often the extract is run

 

The frequency of the intervals for creating the file should be a parameter that can be altered. 

 

Initially, this may be five minutes but could change.  A user interface is not required on the assumption that it will be pretty easy to edit that item in whatever code is provided. Just show me where it is located in the code.

 

Timing of when the extract run

The extract should run at regular intervals based on a parameter that I can access e.g. 5 minutes.

The standard time periods for Metatrader should be possible; M1, M5, M15, H1, H4, D1

 

Using five minuets, say, each run should start on the next exact five minute mark, the opening of the next M5 candle. If the run is set up at 13.06 then the next extract should be at 13.10.

 

M15 should start at the next quarter hour. If the run is set up at 13.06 then the next extract should be at the beginning of the next M15 candle - 13.15.

 

H1 should start on the next hour.  If the run is set up at 13.06 then the next extract should be at the beginning of the next H1 candle - 14.00.

 

H4 should start at the beginning of the next H4 candle etc.

 

 

File Name

Each file created should have a unique file name made up of Metatrader logon (Account number of the account, Date (format yyyymmdd), Broker time that the extract was performed (24 hour format hhmm)

 

An example of a file name

50796986

Account number

20230309

Date

1605

Broker time

 

 

 

The filename would look like this:

50796986202303091605

 

 

 

 


 

File content

File to contain values under the column headings from the trade tab of the toolbox.  The required columns are listed below and See example at the end of this section.

 

Note that there are two additional columns required:

A column should be added with the time of the file creation (Timestamp).  This column allows a time based analysis of the individual open positions.

 

A column should be added for the terminal login (not the hashed number created by MT5 for the data folder)

 

I will be combining different files from different accounts, so I need to know where the transactions originated!

 

File columns

Symbol

ticket

time[Entry]

type

volume

price[entry]

SL

TP

Price [at the time of the extract]

Value

Swap,

Profit

Magic

Comment

Terminal Login

Timestamp of report

 

The order of the columns or rows is not important if an existing function provides it in a different sequence.

 

e.g. Copied from a trade terminal but with the new time created column added. (see zip file attached)


 

 

File location

Write each file to an standard Metatrader folder for the terminal: MLQ5/shared projects. Using the naming requirement will mean that every file has a unique name.

 

 

Conclusion

Let me know what else you need or if you think there is a different way to do this.

 

 

Ian Fraser


파일:

응답함

1
개발자 1
등급
(158)
프로젝트
175
43%
중재
6
0% / 67%
기한 초과
8
5%
작업중
2
개발자 2
등급
(135)
프로젝트
177
18%
중재
17
47% / 18%
기한 초과
0
작업중
3
개발자 3
등급
(8)
프로젝트
9
22%
중재
0
기한 초과
0
무료
비슷한 주문
I'm looking for a skilled developer to help build a custom trading strategy for NinjaTrader 8 (N8). The project involves developing and fine-tuning a strategy tailored to specific market conditions. Experience with NinjaScript, strategy optimization, and backtesting is highly preferred. If you're available and have expertise in N8 strategy development, please get in touch to discuss further details
I have a python script that connects MT5 to Deriv for binary trading which is having some bug. It stops executing trades after a while. I need someone to check the code and fix it. Negotiable price
I currently have a Forex trading script in .txt format that I want to be converted to a functional/working robot (in .mq4), without altering the strategy of the script. The strategy of the script is already in and shouldn't be changed unless with mutual understanding

프로젝트 정보

예산
30+ USD
VAT (23%): 6.9 USD
총: 36.9 USD
개발자에게
27 USD