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.
Ähnliche Aufträge
I’m building a trading signal platform called Tradexa focused only on US30 and Nasdaq. I need you for Phase 1: to build the signal engine/logic side. The system must use strict top-down analysis (H4 → H1 → M15) and generate M15 trade signals only when all conditions are met, including liquidity sweep, structure shift, retest, SL and multiple TPs. I already have a detailed rule sheet for the strategy and signal
Title Professional AI Automation Trading Bot for Forex & Crypto Solution Language Python (preferred) or MQL5 depending on integration requirements. Categories Expert Advisor (EA) for MetaTrader 5 Automated trading strategies AI/ML-based signal generation Risk management automation Required Skills Strong knowledge of MQL5/Python Experience with MetaTrader API integration Machine learning model deployment
I need an Ai trading bot for Binance and BTC on MT5 that also uses order flow data. It should also make use of TSI- Temporal indicator sampling and also it should make use of fundamental analysis in the process of signal generation
Title: MT5 Forex Trading Robot Development I need a MetaTrader 5 (MT5) Expert Advisor (EA) for automated Forex trading. Requirements: 1. The robot must be fully automated and capable of opening and closing trades without manual intervention. 2. Compatible with MetaTrader 5 (MT5). 3. Adjustable lot size, Stop Loss, and Take Profit settings. 4. Built-in risk management based on account balance. 5. Ability to trade
MT5 EA Developer for Structured ICT/SMC Market Logic Requirements Specification: I need an MT5 Expert Advisor only in MQL5. No indicator, no script, no DLL, and no external API. The EA must be built on a rule-based ICT/SMC-style framework with objective, backtestable logic. I am not looking for social-media-style ICT/SMC interpretation. I need a developer who can convert trading concepts into clear coding rules. The