EA or script that analyse a portfolio os backtests inclugind MAE and MFE analysis

指定

MT5 Portfolio Analysis EA: “Portfolio EA”

 

Before you start:

In the following post you can see a project that do most that I’m asking here and can help you to understand this project:

https://www.mql5.com/ru/blogs/post/732868#comment_14662408

 

I would like to add more analysis to this EA in future, so would be good prepare it to this.

 

I would like to protect this software from unauthorized use (maybe work with license key – item E).

 

I need source code.

 

For this project I will provide you a demo account from market that I’m most interested on: (Brazil stock and future markets).

 

 

A)  Data Basis: Strategies Backtest:

 

One by one BT Data with MAE/MFE:

-       To make this project easier to understand let’s suppose that I have 5 different EAs Backtests: bt1, bt2, bt3, bt4 and bt5 (it’s an example, I can use bigger or smaller portfolios ok?). I will run BT from this 5 EA strategies in mt5 (maybe from some different EA and different pairs). This 5 BT have to have MAE and MFE information (As I know TST cache file have this informations – if you know another better way to get this information from BT you can use it). This will be the data basis for the project.

 

 

 

B)  Consolidate Strategies Backtests inside a Portfolio by “Portfolio EA”

 

-       For this project I will call “Portfolio EA” for the program that you must code to make all analysis.

-       Inside "Portfolio EA" settings I need the option to indicate which EAs BTs to use for a Portfolio creation/analysis. This can be done by indicating a folder in “Portfolio EA” Settings, or other way better if you find one. In this example I would indicate data from item A (bt1, bt2, bt3, bt4 and bt5)

 

-       “Portfolio EA” must run a BT (tick by tick) analyzing all Portfolio simultaneously, returning the results as a MT5 normal BT (plus some analysis explained in item D). This Portfolio BT HAVE to considerate MAE and MFE from whole portfolio, tick by tick, even if portfolio have different pairs and different timeframes.

C)   Portfolio EA Settings:

 

-       Besides Portfolio BT detailed in B, the “Portfolio EA” must have the following settings (optimizable settings):

o   Max Gain to close positions;

o   Max Loss to close positions;

o   Max MAE to close positions;

o   Max MFE to close positions;

o   Profit Trailing

§  Trigger 1

§  Minimum Portfolio Gain 1

§  Trigger 2

§  Minimum Portfolio Gain 2

§  Trigger 3

§  Minimum Portfolio Gain 3

 

Details Regarding MAE/MFE:

 

The “Portfolio EA” shall allow to stipulate Gain and Loss targets for the Entire Portfolio based on MAE/MFE values, calculating minute by minute (tick by tick). If you stipulate, for example, a goal of Loss of 500 and Gain of 1000, the portfolio must be processed considering these goals (when reaching one of the goals, the portfolio is finalized on that day, moving on to the following day). At the end, the results should be presented in a graph and spreadsheet (mt5 native report)– The objective of this backtest is to find the ideal combination of portfolio gain and loss.

 

Details Regarding Profit Trailing:

 

In this settings “Portfolio EA” shall analyze tick by tick profit for the entire portfolio, and determinate new targets to close all positions according to triggers and Minimum Portfolio Gain. Let’s see an example:

 

o   Profit Trailing

§  Trigger 1: 100

§  Minimum Portfolio Gain 1 :50

§  Trigger 2 : 200

§  Minimum Portfolio Gain 2 : 100

§  Trigger 3 : 300

§  Minimum Portfolio Gain 3 : 150

§   

In the settings above when portfolio gain reach 100 (trigger1) the minimum portfolio gain is 50. If gain falls to 50, all orders for that day are closed.  Otherwise if gain keep rising, and reach 200 (trigger 2) then the minimum portfolio gain is now 100. Same behavior to trigger 3.

 

 

 

D)  Extra data analysis: OLHC, Correlation, Strategies EA evolution in graph, Monte Carlo Analysis

 

In Portfolio BT report explained in B, include the following analysis/reports:

 

OHLC:

Create a candle graph presenting MAE/MFE results showing Open, High, Low and Close (OHLC) positions. Example:

 

 


 

Strategies Correlation:

 

Present the Correlation analysis between Strategies Inside Portfolio, allowing to show daily, monthly or yearly correlation: Example:

 

 

Strategies Results presented in graph:

 

This would be an improvement from mt5 report. Present here the whole portfolio evolution (line blue in example) and one by one strategy evolution (other lines in example)

 

 

Monte Carlo Analysis

(https://kjtradingsystems.com/monte-carlo-probability-cones.html)

 

Monte Carlo analysis report to portfolio and any strategy separately. Example:

 

 

E)  License

 

Serial key generator based in account number


反馈

1
开发者 1
等级
(295)
项目
473
40%
仲裁
103
41% / 23%
逾期
78
16%
繁忙
发布者: 2 代码
相似订单
1️ ⃣ Informações Gerais Plataforma: MetaTrader 5 Tipo: Expert Advisor (EA) Operação: Hedge + Grid Dinâmico Indicador base: Average True Range (ATR período 20) 2️ ⃣ LÓGICA OPERACIONAL 🔹 2.1 Abertura Inicial O robô trabalha sempre com ordem de compra e venda ao mesmo tempo (HEDGE) e o fechamento é sempre usando GRID que tem multiplicador de lote e o tamanho (espaçamento) dinâmico com base em um fator de
Já tenho um código MQL5 com uma base do funcionamento. Basicamente o EA traça um canal na virada do dia (penso que utilizar horário seria melhor em razão da diferença entre corretoras), com base em um número x de candles, calcula e posiciona ordens stop com base em % do capital. Caso uma ordem aberta venha a stopar, o EA deve realizar uma virada de mão com base no mesmo canal, contudo recalculando o lote para que
//+------------------------------------------------------------------+ //| EA Cruzamento de Médias MT5 | //+------------------------------------------------------------------+ #property strict #include <Trade/Trade.mqh> CTrade trade; //---- Inputs input int FastMAPeriod = 20; input int SlowMAPeriod = 50; input double LotSize = 0.01; input int StopLoss = 300; input int TakeProfit = 600; //----
TradingView to MT5 Webhook Bridge - Futures to Spot Execution Project Goal I need a developer to build a bridge between my TradingView indicator in the futures market and my existing MetaTrader 5 EA in the spot market. When my TradingView indicator generates a BUY or SELL signal on a futures symbol, for example 6A1!, it must automatically trigger my MT5 EA to open a trade on the corresponding spot symbol, for example
Tenho um indicador e quero fazer um expert dele para rodar automático porem só tenho o arquivo .ex4 e não .mq4 Indicador mostra setas no grafico no momento ideal para comprar e vender
Anexei o vídeo de como é o EA que preciso, abaixo segue a descrição Estratégia de Grid Direcional com Prioridade e Controle Financeiro Descrição Geral Preciso desenvolver um Expert Advisor (EA) em MQL5 para MetaTrader 5, baseado em uma estratégia de operações progressivas por níveis (grid) , com controle financeiro por lucro e perda , prioridade direcional e gestão independente de compras e vendas . O robô NÃO
Criterios de entrada: 1 stochastico em um tempo gráfico maior, por ex: 1h 1 stochastico em um tempo grafico menor, por ex: 5m *venda: quando o stoch do tempo maior estiver vendido, espera-se o stochastico do tempo menor entrar na zona de overbought e cruzar pra venda, a venda deve ser a mercado na abertura do candle seguinte ao candle que fez o stoch virar pra venda, ou seja a ordem só deve ser aberta quando o candle

项目信息

预算
300 - 500 USD