Adding of Proposed vs Current Value at Risk Filter

İş tamamlandı

Tamamlanma süresi: 10 saat

İş Gereklilikleri

Context: Watch the following video for an example usecase - https://www.youtube.com/watch?v=3FV8PTikKc0


What I have at the moment is an Expert Advisor that calculates the Total Value at Risk for Currently Open Symbols.

Outcome, a bool (true / false) variable that checks the symbol , lot size and assesses whether adding that trade would reduce the value at risk.

e.g. if Proposed Value at Risk < Current Value at risk then the variable is true.

Here is my attempt at this:

bool LowerVAR(string Symbol1, double Lotsize1)
{
    //string CurrPortAssets[]   = {symb1, symb2, symb3, symb4, symb5, symb6, symb7, symb8, symb9, symb10};
    //double CurrPortLotSizes[] = { SumLots(symb1), SumLots(symb2), SumLots(symb3), SumLots(symb4), SumLots(symb5), SumLots(symb6), SumLots(symb7), SumLots(symb8), SumLots(symb9), SumLots(symb10)};      
   string CurrPortAssets[];
   double CurrPortLotSizes[];
    
    CPortfolioRiskMan PortfolioRisk(InpVaRTimeframe, InpStdDevPeriods, InpCorrelPeriods);

    PortfolioRisk.CalculateIncrementalVaR(CurrPortAssets, CurrPortLotSizes);

    // CREATE PROPOSED POSITION ARRAY AND ADD PROPOSED POSITION
    string ProposedPortAssets[];
    double ProposedPorLotSizes[];
    ArrayResize(ProposedPortAssets, ArraySize(CurrPortAssets) + 1);
    ArrayResize(ProposedPorLotSizes, ArraySize(CurrPortLotSizes) + 1);

    ArrayCopy(ProposedPortAssets, CurrPortAssets);
    ArrayCopy(ProposedPorLotSizes, CurrPortLotSizes);

    ProposedPortAssets[ArraySize(ProposedPortAssets) - 1] = Symbol1;
    ProposedPorLotSizes[ArraySize(ProposedPorLotSizes) - 1] = Lotsize1;

    // POSITION DIAGNOSTICS
    string posDiagnostics = "";
    for (int i = 0; i < ArraySize(ProposedPortAssets); i++)
    {
        string posType = (i == ArraySize(ProposedPortAssets) - 1) ? "PROPOSED" : "EXISTING";
        posDiagnostics += "Pos " + IntegerToString(i) + " " + ProposedPortAssets[i] + " " + DoubleToString(ProposedPorLotSizes[i], 2) + "  (" + posType + ")\n";
    }

    // CALCULATE THE PROPOSED VaR IF NEW POSITION WERE ALLOWED TO OPEN
    PortfolioRisk.CalculateIncrementalVaR(ProposedPortAssets, ProposedPorLotSizes);
    double proposedValueAtRisk = PortfolioRisk.IncrementalVaR;

    return TotalValueAtRisk > proposedValueAtRisk;
}


What I need next is some assistance in editing / making a change to this so that I can achieve the above goal above.

Please check all the content and I will send you the code (which I have already created), I just need to make sure you understand he task.


Looking forward to working with you :)


Yanıtlandı

1
Geliştirici 1
Derecelendirme
(206)
Projeler
336
16%
Arabuluculuk
23
39% / 30%
Süresi dolmuş
18
5%
Meşgul
2
Geliştirici 2
Derecelendirme
(9)
Projeler
20
10%
Arabuluculuk
3
67% / 33%
Süresi dolmuş
5
25%
Serbest
3
Geliştirici 3
Derecelendirme
(8)
Projeler
18
17%
Arabuluculuk
3
67% / 0%
Süresi dolmuş
0
Serbest
Benzer siparişler
Hello, I need a seasoned PineScript and MQL coder to help with an algorithm development by converting an indicator on TradingView to MT4 then build an EA with the same logic of the indicator and in addition to the ideas I want in the expert advisor(Rules & Conditions) of exactly the features needed for implementation to have the expert advisor designing as my expected products, ONLY REACH OUT IF YOU HAVE BEEN
Hello Developers, I'm looking for someone who has had past success and is familiar with the above concepts—something similar to the popular LuxAlgo SMC indicator on Tradingview. The objective is to develop the indicator to create an expert adviser that incorporates the above. Dedication to help achieve this project is what I'm looking for. If you're someone who will go above and beyond for the client and is willing
Hi, I'm looking to replicate or create a tradingview indicator for quantower and I want to know how much it will cost me. You can access the indicator through this link
I need to add an alert to my SMC Order Blocks indicator. This is a custom indicator that was made for me some time ago. This custom indicator already has built-in alerts, but I need to add another type of alert, keeping the existing alerts unchanged. The alert will be for a specific Order Blocks pattern. This indicator graphically provides a zigzag, from which CHoCH and BOS are derived with their respective zones of
Hello programmers, I’m looking only for veteran programmers with profound knowledge and experience in strategy optimization to improve my EA. The backtests are incredible, even with REAL TICKS of 100% quality Dukascopy data, but real results are quite disappointing on my specific brokerage. I would really love to adapt the EA so that back testing results and forward testing can better match. The strategy uses a
I'm looking for someone who can convert a pinescript from trading view to MQL5. The task requires knowledge of MQL5 coding standards and the ability to translate logic from the original script accurately
I want like to convert my tradingview indicator to mt4 EA I use 3 MA MSB RSI The list of the 4 indicators are on TradingView, 1. Market Structure Break And Order block. By EmreKb 2. TMA - Divergence Indicator (V2) 3. Multiple MA (21,50,100) 4. SuperTrend
Project Overview: I would like you to develop a Moving Average Crossover Trading Bot for MetaTrader 5 (MT5), compatible with all trading instruments (Forex, Stocks, Indices, Commodities, etc.), that incorporates machine learning algorithms to improve the strategy’s performance. The bot should be customizable, allowing users to adjust various parameters such as risk percentage, moving average periods, stop loss, take
Expert advisor in mql5 50 - 130 USD
Hi, I need an expert advisor for forex multi currency and multi timeframe that ea would give one percent profit from all trades. After profit that ea will close all orders. Regards
Hope so, you are fine and in good health I would like to invite you for the work, I have one indicator that is written in pine script (Tradingview) language, I would like it to be converted to Mql5, that will further lead in making of trading bot according to condition I will share with you Following, the indicator file is already attached, kindly look into it and if you can , I would be happy to work with you

Proje bilgisi

Bütçe
85+ USD
Geliştirici için
76.5 USD
Son teslim tarihi
to 2 gün