Apply an article to my code (Simple) :)

Spezifikation

Link of the article: https://www.mql5.com/en/articles/197

As in the article, I want to create a multithreaded calculation system. Basically, I want to calculate an array as quickly as possible (using multithreads). Below is the code snippet that takes to calculate:


if (MODULE == 0 || (MODULE == 1 && !isSessionCalculated)) {

                  string progressBar = "";

                  int progressLength = 100;

                  for(int i = 0; i < total_combinations; ++i) {

                      CombinationResults result;

                      for(int j = 0; j < 13; ++j) {

                          weights[j] = combinations[i][j];

                          result.weights[j] = weights[j];

                      }

                      ArrayResize(signals, 0);

                      GetAndFilterSignals(weights, currentDateTimeStr);

                      double total_profit = 0;

                      int qtd_wins = 0;

                      for(int k = 0; k < ArraySize(signals); ++k) {

                          double trade_result = SimulateTrade(signals[k].date, signals[k].strength);

                          if (trade_result > 0) {qtd_wins++;}

                          total_profit += trade_result;

                      }

                      int T = ArraySize(signals);

                      double P = T > 0 ? total_profit / (double)T : 0;

                      double W = T > 0 ? qtd_wins / (double)T : 0;

                      double R = TAKE_RATIO;

                      double K = T > 0 ? W - ((1 - W) / R) : 0;

                      result.T = T;

                      result.W = W;

                      result.P = NormalizeDouble(P*100000, 2);

                      result.K = K;

                      results[i] = result;

                      int currentProgress = (i + 1) * progressLength / total_combinations;

                      progressBar = "[";

                      for(int j = 1; j <= progressLength; j++) {

                          if(j <= currentProgress) {

                              progressBar += "|";

                          } else {

                              progressBar += " ";

                          }

                      }

                      progressBar += "] " + IntegerToString(currentProgress) + "/100 (" + total_combinations + ")";

                      Comment(progressBar);

                      QuickSort(results, 0, ArraySize(results)-1);

                      isSessionCalculated = true;

                  }

Bewerbungen

1
Entwickler 1
Bewertung
(8)
Projekte
22
32%
Schlichtung
1
0% / 0%
Frist nicht eingehalten
1
5%
Beschäftigt
Ähnliche Aufträge
Hello, I need a developer to help me convert my thinkorswim strategy into tradingview and also do some modifications without any errors and make it work perfectly your expertise is highly needed in this project kindly reach out to me and let's proceed thanks
Hello, I need a developer or coder to help me code my custom Quantower strategy and make it work perfectly with errors and also make some modifications in other to work perfectly on the platfrom, kindly reach out to me your expertise is highly needed for this project thanks
will create Show Balance script in MQL4 on MT4 and. I will Create: Copy trade from mt4 to OKX SPOT API WEBSITE https://www. okx .com/docs-v5/en/#overview I want When open position buy on mt4 >> will buy on OKX spot When close this position on mt4 >> will sell on OKX spot When open position sell on mt4 >> will sell on OKX spot When close this position on mt4 >> will buy on OKX spot just one file MQL4 / exe work on mt4
I bought FXSSI.com tools (sentiment indicator) including the following indicator: FXSSI.Ratio.ex4 (.mq4 versions are not provided) Now I am trying to export the indicators' output values in an EA in order to generate trading signals and to backtest strategies based on various combinations of some of these indicators but I can't make it work. I use iCustom() but it always returns either: > 2147483647 if indicator is
I need a trading robot that will be about to enter and get out of trades automatically following a set of conditions that will be provided. it will be determining the trend on a higher time frame and making trades on a lower timeframe
Trade Copier 1. Copy same Trade. 2. Also TP and SL 3. Need reverse trading Master to Slave 4. Adjust TP and SL future on Slave if you agree send sample copy first
hi, I need to convert my MT5 robot to Python for the freqtrade framework, https://www.freqtrade.io/en/stable/strategy-customization/ For trading futures on Bybit or Binance, I can also send the MT4 version if it is more convenient
Convert Pine Script Trading view To MT4 Convert Attach Script to mt4 with buy and sell signals on Chart and Data Window. The buy and sell signal must be the SAME signals, on the same candles. No deviation. Must Match BTC 1 hr to buy and sell signals... no deviation
hello 👋 great developer am looking for developer that will help me to convert pinescript strategy to mt4 strategy I will be looking for your bid soon Best regards Ayofe
Hello! I need to make the indicator for Forex Tester 5. The platform supports indicators/strategies/scripts which are written in .dll format and can be created in Delphi or C++ programming languages. Are you interested in the task? In the attached files the Task is explained, and in the file in Excel you can see the formulas and data. The task is to make an indicator for Forex Tester 5. If you want to fulfil the

Projektdetails

Budget
30+ USD
Für die Entwickler
27 USD