Script to list the drawdowns of open positions

MQL5 Komut dosyaları

İş tamamlandı

Tamamlanma süresi: 2 gün

İş Gereklilikleri

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


Dosyalar:

Yanıtlandı

1
Geliştirici 1
Derecelendirme
(157)
Projeler
174
43%
Arabuluculuk
6
0% / 67%
Süresi dolmuş
8
5%
Serbest
2
Geliştirici 2
Derecelendirme
(132)
Projeler
170
18%
Arabuluculuk
17
47% / 18%
Süresi dolmuş
0
Çalışıyor
3
Geliştirici 3
Derecelendirme
(8)
Projeler
9
22%
Arabuluculuk
0
Süresi dolmuş
0
Serbest
Benzer siparişler
I am looking for a skilled Thinkorswim script developer for a one-time project. Your task will be to combine 8 distinct Thinkorswim studies (I will provide the code for each) into one Lower Study. The final script should display histogram rows for the individual studies with a bubble color scheme of bright green, dark green, gray, dark red, and bright red
I need some who can develop my strategy and hand me over the source code... I will give you the specific area in the market i want to mark out and then set pending orders to execute once price move into the zone
C onversion from Ninjatrader to Tradingview. This includes thorough testing and debugging to guarantee that the script functions as intended on Tradingview...If you are in for this job kindly bid
I believe in Robotics as a major artificial intellect to function of growth of business.Therefore if you script there is a likelihood of bringing economies of scale.The retrospective of the dynamics of indulgence of work can be economics of scale
there I hope you're doing well I want to convert the tradingview indicator to make an indicator for mt5. And in that, I want to make an automatic robot on the base of the indicator. I have the pine script of that indicator
Looking for someone who is able to code MQL for MT5 manager plug-in? Please contact me for more info. it is mainly on when to trigger a stop out of the account
see trade open on every tick seconde ok forex pair us us30 if is current running at 40170.00 so open 2 trade buy stop and sell stop both in every tick pending order of buy stop will 40171.00 and sell stop pending order will be 40169.00 buy stop will open at 40171.00 and tp will be 40173.00 and SL will be 40169.50 ok if buy stop hit sell stop order automatically will be close now if sell stop order open at 40169.00 so
hi hi there i have an strategy on tradingview and i want to automate it like metatrader EA so i want the strategy to open and close trade automaticlly on tradingview

Proje bilgisi

Bütçe
30+ USD
KDV (23%): 6.9 USD
Toplam: 36.9 USD
Geliştirici için
27 USD