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

Lavoro terminato

Tempo di esecuzione 54 minuti
Feedback del cliente
Great!

Specifiche

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.


Con risposta

1
Sviluppatore 1
Valutazioni
(253)
Progetti
358
49%
Arbitraggio
24
25% / 50%
In ritardo
80
22%
Gratuito
2
Sviluppatore 2
Valutazioni
(88)
Progetti
143
39%
Arbitraggio
21
19% / 48%
In ritardo
30
21%
Gratuito
Ordini simili
HELLO GREAT DEVELOPER I've been playing with a strategy using an already coded Pinescript V5 Indicator, and wanted to turn it in to a strategy with a few additions. (I have incuded the code for the original Indicator) Trading the 1 minute chart I'd like the strategy to go long if the prices passes the higher ORB 50% line while the 3min 20 WMA is above the 3min 200 SMA and the 3 min RSI is below 50. With a Stop loss
Nsn 30+ USD
Hahsdhdjdjjdndndndnenn dhejjeej eheujeje hejejejjeej jrkr rhejje rhrjrj rhurjr jeirje ejeijeje eururjje e eeuueie heieie heueieub ehurjrue heueieue euruueue eheuueue ejeiueie ueueieue euieieie eueuei. Euieieie euriieie jeirieie eueieije kdeoieieie heueueue ueieieuei euieieie ieieieie ueieieue ueieieue euurieie ueieieie ueieie
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
Looking for a reliable, low-lag reversal indicator for Forex that does not repaint and does not place signals with an offset. Key features: Signals only after confirmation (uses closed bar logic), so alerts are final and do not repaint. No offset placement — arrows/markers appear on the same candle/bar that triggered (or on the close of that bar) to avoid confusion. Tunable sensitivity: adjustable lookback and
Here's a detailed description of an Expert Advisor (EA) based on Heikin Ashi candlesticks: EA Overview The EA will implement a trading strategy based on Heikin Ashi candlesticks, identifying trends and generating trading signals accordingly. Indicator Requirements 1. *Heikin Ashi Indicator*: The EA will use a Heikin Ashi indicator to calculate Heikin Ashi candlesticks. 2. *Customizable Parameters*: The Heikin Ashi
HELLO EVERYONE I NEED AN INDICATOTRE ON STOCH WHICH CAN GIVE ME ALERT WHEN DIVERGENCE AND CONVERGENCE HAPPNING.AND MAKE SURE I CAN CHANGE THE STOCH PERAMETERS IN SETTINGS. PLEASE CONTACT WHO KNOWS ABOUT DIVERGENCE AND CONVERGENCE. THANKS
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
Requirements for SMC Trading EA Platform : MetaTrader 5 (MT5) Strategy : Smart Money Concepts (SMC) Analysis Timeframe : H1 (higher timeframe analysis) Execution Timeframe : M1 (entry and execution) Core Features : Detect Order Blocks Identify Liquidity Zones Detect Fair Value Gaps (FVGs) Break of Structure (BOS) & Change of Character (CHoCH) detection Mark Equal Highs and Lows Trading Functions : Dynamic lot sizing
Ethereum Trading EA 30 - 35 USD
I am looking for an Expert Advisor (EA) that performs well on Ethereum. Ideally, it should be an HFT-style EA; a swing trading EA is also acceptable. I require the full MQL5 source code — the EA must be written entirely in MQL5 (no external languages such as Python). Performance target: Minimum 70% win rate with a 1:1 risk:reward. Input variables required: Stop Levels: Stop Loss (SL) and Take Profit (TP) Trailing

Informazioni sul progetto

Budget
30 - 35 USD
Per lo sviluppatore
27 - 31.5 USD
Scadenze
a 3 giorno(i)