Mathematics calculation written in JavaScript needs to be converted to MQL5

Trabajo finalizado

Plazo de ejecución 1 día
Comentario del Ejecutor
Thank you. Looking forward for future works.
Comentario del Cliente
Soewono has done the job accurately and he was very fast. His explanation and demonstration was clear. Everything went smoothly. Recommended!

Tarea técnica

The three attached files are the follows:

  • Two picture how the HTML file look like. First picture is the default state. The second picture is a random scenario.
  • The third file named mm_html.mq5 is the full source code. If you save it to HTML format then you can open and you will see the same as the pictures. The system doesn't allow to upload HTM that's why I put it in MQ5 format.


Bottom of the HTML file you can see the JavaScript code which is important for us.

I'd like to have a function where the "Next position if win current" and the "Next position if lose current"  is calculated if I pass the parameter "win" or "lose". And if I pass "reset" then reset the system.

You can see three input parameters in the HTML file. These can also be passed to the function.

These calculations are on the JavaScript code provided.

I'd like it in language MQL5.


Open the file in HTML and you will understand everything.

If anything needs to be clarified, feel free to ask me.


Kind Regards,
Ben

Archivos adjuntos:

MQ5
mm_html.mq5
339.4 Kb

Han respondido

1
Desarrollador 1
Evaluación
(19)
Proyectos
24
17%
Arbitraje
7
0% / 71%
Caducado
3
13%
Libre
2
Desarrollador 2
Evaluación
(804)
Proyectos
1376
72%
Arbitraje
113
28% / 48%
Caducado
343
25%
Trabajando
3
Desarrollador 3
Evaluación
(225)
Proyectos
284
42%
Arbitraje
15
13% / 47%
Caducado
67
24%
Libre
4
Desarrollador 4
Evaluación
(82)
Proyectos
86
57%
Arbitraje
25
0% / 84%
Caducado
19
22%
Libre
Solicitudes similares
Looking for an mql5 EA developer to build a custom EA for MT5 based on several simple variables. It will be initially used on 5m EUR/USD, but needs to work with any currency/commodity/stock/crypto. Custom risk management will also need to be built into the EA. Exact variables will be discussed in detail once a developer is selected, but a basic overview of the EA variables is below. Positions will be opened based on
I want an Expert Advisor developed that will use two MAs to determine the trend, then open trades at every candle close subsequently. Each opened trade will have a take profit and a stop loss. The EA should be able to trade multiple forex pairs at the same time, and should also be able to trade on any specified/chosen timeframe. The EA will also have a news filter, to determine if the EA should trade during news
Location: Remote Employment Type:[Full-time/Part-time] About Us At Riskeys, we are transforming the trading experience with our state-of-the-art Smart Trading Keypad for MetaTrader 4/5. Our mission is to empower traders with innovative risk management tools, providing them with the speed, precision, and efficiency they need to succeed in today’s fast-paced financial markets. As we continue to push the boundaries of
Hello, I am looking for a developer to reconstruct an indicator that is currently in an ex4 file into an mq4 file. The indicator provides buy and sell signals with entry points, Stop Loss, and TP1, TP2, and TP3. However, the indicator has some errors, and I would like to correct them. Unfortunately, since I only have the ex4 file, it's not possible to make these corrections directly. Therefore, I would like to
very simple rule buy rate 2 sl 1 if market reach 3 sl 2 market reach 4 sl 3 sl hit reverse trade open too with same 1:1 trail sl system if sl hit reverse trade open with same sl trail function 1 input open trade with buy or sell option 2 sl in pip .............xyz 3 lot size ............. xyz 4 distance from sl when sl trail one step [main point] Iam buying in rate of 2 my sl is 1 market reach 3 my sl is 2 market
I’m looking for someone experienced with Think or Swim to create a backtesting script for an in-the-money Iron Condor strategy using options on the SPX. The strategy involves setting up 10 contracts of an Iron Condor with a 10-point spread width and a net credit requirement of $11 per contract. The goal is to backtest the performance over the last three years, focusing on trades where the SPX closes outside a
Hello, I have a physically trading keyboard and i want to connect it with tradelocker, mt4,mt5 and ctrader. People need to be able to open and close a position with the keyboard really fast. i need it on macos, windows and linux. (desktop) My competition is: www.magickeys.trade My goal is to be the number 1 to sell the keyboards + software. When people order a tradingkeyboard they will get a mail after the purchase
Job Title: Expert Advisor (EA) Developer for Forex Trading Job Description: I am seeking an experienced Expert Advisor (EA) developer to create a customized trading bot for the MetaTrader 4/5 platform. The bot will be designed to execute a sophisticated trading strategy that incorporates daily range calculations, cost averaging, and hedging with precise pip management. The successful candidate should have strong
I need an expert advisor based on MACD and MA signals. It must have check and handling of trade operations errors. The main criteria for opening and closing positions: ◇Both Main and Signal direction must be shown by Arrows which is going to be for buy and sell positions
I need an expert to help me with adding more features to my existing mt4 EA I think the addition I want added to this EA is fairly simple--but I don't really understand how programming works, Contact me for a long term work, This is not the only project, I will explain the features in the inbox, Let me know if you can do it

Información sobre el proyecto

Presupuesto
30+ USD
IVA (27%): 8.1 USD
Total: 38.1 USD
Para el ejecutor
27 USD
Plazo límite de ejecución
a 18 día(s)