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
Hello, i would like to have a ninjatrader indicator. I wanna to have a footprint indicator with delta, imbalances and big trades identifiable. Also I wanna sell it on whop. And it should be fully customisable in NT8
Intraday Trade Ninja EA Indicators used: Price Border(TMA) MA-X Arrows xSuperTrend Candles EMA 49 & 89- Per Candle Color Switching Lemansignal 200 SMA Major Criteria to consider before a trade setup or condition is taken · The price must have touched/tested the upper or
//+------------------------------------------------------------------+ //| LEVEL 100 SNIPER BOT (SMC + ATR + RSI + Trend Filter) | //+------------------------------------------------------------------+ #property strict #include <Trade/Trade.mqh> CTrade trade; //--- Inputs input double RiskPercent = 1.0; input int FastMA = 20; input int SlowMA = 50; input int RSI_Period = 14; input int ATR_Period = 14; input
//+------------------------------------------------------------------+ //| Simple Moving Average Crossover EA | //+------------------------------------------------------------------+ #property strict input int ShortMA = 10; input int LongMA = 50; input double LotSize = 0.01; int shortMAHandle; int longMAHandle; //+------------------------------------------------------------------+ int OnInit() { shortMAHandle =
The file must be fast to move with the market. It must be transparent it must move accordingly with the market and increase the money and also with less risk
Description: I am looking for an experienced MT4/MT5 (MQL4/MQL5) developer for consultation and possible future development of an advanced Expert Advisor architecture. This is NOT a simple RSI, MACD, martingale, or indicator-only EA project. I already have an existing EA framework using: RSI timing logic EMA direction filters trend and volatility filters DCA / basket management protection and recovery logic Now I
I need an experienced MQL5 developer to build a custom MT5 Expert Advisor for XAUUSD. Strategy Overview: Trend-following using EMA 50/200 on H4 and H1 Pullback entries on M5 using RSI + candle confirmation No martingale, no averaging down Controlled scaling only when trades are already in profit Maximum 2–3 positions per direction Risk Management: Daily loss limit (%) Equity hard stop (%) Consecutive loss pause
I am looking for an experienced MT4 developer or strategy tester to run a comprehensive optimization of my existing Expert Advisor (EA). The EA is already developed and working as intended — your task will be to configure and execute the optimization process using the "Every tick based on real ticks" model. Scope of Work: Run EA optimization in MT4 Strategy Tester. Use "Every tick based on real ticks" as the
Create a fully working Expert Advisor (EA) for MetaTrader 5, designed exclusively for GOLD (XAUUSD only). This is a high‑probability trend‑following breakout strategy built specifically for passing 2‑step prop firm challenges — it delivers a ~60–65% win rate, uses a strict 1:3 risk/reward ratio, and is optimised to pass both phases in roughly 1–2 weeks total. --- ⚙️ USER INPUTS — FULLY FLEXIBLE RISK --- All main
This EA is for trading XAUUSD. There are 2 trade logics. One based on trend reversal (with 5 trade opening conditions). The second is based on trend continuation (with 1-2 conditions)