Recoding MT4 Entropy Indicator or Fixing an Entropy Indicator from the C Language

MQL4 Indicators Converting C++ Java Forex

Job finished

Execution time 54 minutes
Feedback from customer
Great!

Specification

I have three versions of an Entropy indicator, but they have problems and need fixing.

One entropy indicator, after attaching it to the chart, after an hour or two disappears.

The other two entropy indicators stays at zero.

I have attached a picture to show what I mean.


So, they need to be remade from the C Language or recoded.


What is Entropy?  "Entropy is a well-known measure of disorder or unavailability of energy in a (closed) system. More entropy generally means less predictability, hence one often tries to minimize it":


Here is the C language program of it:

http://www.foretrade.com/entropy.htm

Definition from http://mathworld.wolfram.com/Entropy.html


The source C code for this indicator which can be compiled with any (free) C compiler:


#include "math.h"

#include "stdlib.h"


__declspec(dllexport) void Entropy (double *price, double *entropy, long int size, long int numbars)

{

double *in, *out, P, G;

long int i,j;

double sumx = 0.0;

double sumx2 = 0.0;

double avgx = 0.0;

double rmsx = 0.0;


in=price;

out=entropy;


for (i=0; i<size; i++)

{

if (i < numbars+1) *out = 3.4e38;

else 

{

sumx = sumx2 = avgx = rmsx = 0.0;

for (j=0;j<numbars+1;j++)

{

sumx += log(*(in-j) / *(in-j-1)) ;

sumx2 += log(*(in-j) / *(in-j-1)) * log(*(in-j) / *(in-j-1));

}

if (numbars==0) 

{

avgx = *in;

rmsx = 0.0;

}

else 

{

avgx = sumx / numbars;

rmsx = sqrt(sumx2/numbars);

}


P = ((avgx/rmsx)+1)/2.0;

G = P * log(1+rmsx) + (1-P) * log(1-rmsx);

*out=G;

}

in++; out++;

}


Here are three failed attempts at making the Entropy indicator attached.  They either disappear and show only previous data, or they are stuck at zero while the previous bars display the correct value of entropy.


Responded

1
Developer 1
Rating
(253)
Projects
358
49%
Arbitration
24
25% / 50%
Overdue
80
22%
Free
2
Developer 2
Rating
(88)
Projects
143
39%
Arbitration
21
19% / 48%
Overdue
30
21%
Free
Similar orders
PLEASE READ: IF YOU ARE NOT GOING TO ACCEPT THE BELOW THEN PLEASE MOVE ON TO THE NEXT CLIENT. I NEED SOMEONE WHO WILL DO THE WORK FIRST AND THEN CREATE A BUILT-IN DEMO INDI AS PER SPECIFICATIONS BELOW WHICH HAS AN EXPIRY (A DAY OR 2) SO THAT I TEST THE INDI BEFORE WE CREATE THE ORDER. I HAVE HAD PEOPLE WHO PRESSURE ME TO CREATE THE ORDER AND THEN THEY END UP DEVELOPING A FAULTY INDICATOR. AND I HAVE GIVEN THEM THE
Project Overview: We are seeking a highly skilled and experienced developer to build a next-generation Forex Expert Advisor (EA) for MetaTrader 5. The core innovation of this project is an EA that relies 100% on a custom deep learning AI model (e.g., LSTM, Transformer) for generating all trading signals. The EA will trade the XAU/USD (Gold) instrument. The developer must be proficient not only in advanced MQL5
PLEASE READ: IF YOU ARE NOT GOING TO ACCEPT THE BELOW THEN PLEASE MOVE ON TO THE NEXT CLIENT. I NEED SOMEONE WHO WILL DO THE WORK FIRST AND THEN CREATE A BUILT-IN DEMO INDI AS PER SPECIFICATIONS BELOW WHICH HAS AN EXPIRY (A DAY OR 2) SO THAT I TEST THE INDI BEFORE WE CREATE THE ORDER. I HAVE HAD PEOPLE WHO PRESSURE ME TO CREATE THE ORDER AND THEN THEY END UP DEVELOPING A FAULTY INDICATOR. AND I HAVE GIVEN THEM THE
📌 DOGE/USDT Trading Bot – Full Strategy Current DOGE/USDT price: ≈ 0.2714 USDT (for reference only). Exchange: Binance Futures Margin type: Isolated Margin Leverage: x2 Pair: DOGE/USDT Language: Python (Binance API) ⸻ 🔹 Strategy Logic 1. Initial Entry • Open a Market Order with 2000 USDT as the base trade. • Base remains fixed for each cycle. 2. Reinforcement (During Downtrend) • Every 5 minutes during a price
PLEASE ONLY GENUINE APPLICATIONS! I am looking for a MT5 EA that I can successfully use to pass Prop Firm challenges in reasonable time and successfully trade funded account whilst staying within 4% daily drawdown and 8% max drawdown and profiting ideally 10% or more a month. The EA must: 1) Be suitable for prop firms 2) Stay within daily drawdown of 4% 3) Stay within max drawdown of 8% 4) Consistently profit 10%
I need developer to modify a simple mql4 indicator with non-repainting Buy/Sell arrows, selectable timeframe (current or higher), and alerts, push notifications.The indicator mq4 file will be provided as this is a simple change. I will need quick turnover of this work.Please apply if interested
PLEASE READ: IF YOU ARE NOT GOING TO ACCEPT THE BELOW THEN PLEASE MOVE ON TO THE NEXT CLIENT. I NEED SOMEONE WHO WILL DO THE WORK FIRST AND THEN CREATE A BUILT-IN DEMO INDI AS PER SPECIFICATIONS BELOW WHICH HAS AN EXPIRY (A DAY OR 2) SO THAT I TEST THE INDI BEFORE WE CREATE THE ORDER. I HAVE HAD PEOPLE WHO PRESSURE ME TO CREATE THE ORDER AND THEN THEY END UP DEVELOPING A FAULTY INDICATOR. AND I HAVE GIVEN THEM THE
I need an Expert Advisor (EA) that can trade on Forex pairs, Metals (like XAUUSD), and Crypto coins . Key points: Fixed lot size (configurable). EA should work on multiple asset classes. A simple on-chart control panel to manage EA: Start/Stop trading Enable/Disable strategies Change lot size (buttons +/–) Payout button → closes all profitable trades and adds profit to balance ATR-based option for stop loss /
Convert Advanced SMC Pine Script Strategy to MQL5 EA / Autotrade option Job Description: We are seeking an experienced MQL5 developer to accurately convert a sophisticated Smart Money Concepts (SMC) strategy from TradingView Pine Script into a robust, professional-grade MetaTrader 5 Expert Advisor (EA). The original code is complex and includes advanced logic for pivot detection, dynamic position sizing, and visual
Mthizo trades 30 - 200 USD
- *Currency Pairs*: Major pairs such as EUR/USD, XAU/USD and GBP/USD - *Funding Currency*: South African Rand (ZAR) - *Initial Deposit*: R100 (may require additional deposit for live trading) - *Risk Management*: Basic risk management features, such as stop loss and take profit - *Strategy*: Pre-defined strategy based on Smart Money Concept principles - *Cost*: Approximately R100-R200 (one-time cost or

Project information

Budget
30 - 35 USD
For the developer
27 - 31.5 USD
Deadline
to 3 day(s)