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 Developers I have a Project to get done! i have a simple strategy can you please create the automated forex ea to execute my trading strategy? i need custom ea for tradingview and mt4/mt5 correction: i need a tradingview indicator created that tells me when to buy or sell. and ea in mt4/mt5
Mam kody EA Bot. Chciałbym je dokończyć, dopracować i ukończyć projekty. Chciałbym otrzymać pliki SET po ukończeniu EA. Jeśli jesteś zainteresowany, skontaktuj się ze mną. Szukam doświadczonego programisty do stworzenia dedykowanego doradcy eksperckiego (EA) do tradingu. Programista powinien posiadać solidną wiedzę z zakresu MT5, logiki strategii, wskaźników, zarządzania ryzykiem i backtestingu. Doświadczenie w
I am looking for an experienced MQL5 developer to create a custom technical indicator for MetaTrader 5. The indicator should combine Supertrend logic with Support/Resistance pullback levels to generate high-probability entry signals. 1. Core Logic The indicator must follow a two-step confirmation process: Trend Identification: Use the Supertrend indicator to determine the primary trend. Entry Signal (The
It must have automated stop loss. Something that can end poverty and kill the market early.It must take the trades for me whenever I start it it must work on tradeport ea
أبحث عن خبير تداول آلي (EA) أرفقتُ فيديو له. يقوم هذا الخبير بوضع أوامر شراء معلقة وبيع معلقة على بُعد 250 نقطة أعلى وأسفل السعر الحالي كل دقيقة، مع تحديد مستوى وقف الخسارة (SL) عند 300 نقطة ومستوى جني الربح (TP) عند 500 نقطة. إذا تم تفعيل أيٍّ من هذين الأمرين خلال الدقيقة، يتم إلغاء الآخر. لا يقوم الخبير بوضع أي أوامر معلقة حتى يتم الوصول إلى مستوى وقف الخسارة أو جني الربح، ثم يضع مجموعة جديدة من الأوامر المعلقة في
Hi All, I am looking for an EA which I have attached the video of. It places a buy stop and sell stop with 250 pips above and below current price for every minute with SL as 300 pips and TP as 500 pips. If any of of them triggers in the minute other will be cancelled, it will not place any pending orders till either of SL or TP is hit and places new set of pending orders the very next minute of SL or TP hit minute
Title: Advanced Manual Hedge EA with Multiplier & Multiple Trade Support Project Requirements: I need a professional Expert Advisor (EA) for XAUUSD and Forex to manage manual trades with the following logic: Lot Multiplier: The EA must automatically detect my manual trade size. There should be a "Multiplier" input (e.g., 3.0). If I open 1.0 lot Buy, the EA must auto-place a 3.0 lot Sell Stop at the set Gap
Need to convert tradingview indicator "Momentum Candle V2 " to MT5. The indicator on mt5 must be the same as on tradingview...same settings and if it's possible the same graphics
📢 Project Title:MT5 Expert Advisor (EA) – Advanced Renko Strategy (Full Automation) 📄 Project Description:I want to develop a fully automated MT5 Expert Advisor (EA) based on my existing TradingView Renko strategy.I already have a working Pine Script that generates Buy/Sell alerts with ATR and other logic. Now I need the same strategy to be fully converted into MT5 EA with built-in Renko logic (no external
Technical Specifications: "Dawn Range Breakout" Expert Advisor (Final Version) 1. Overview The purpose of this EA is to capture the breakout of a specific hourly range on Gold (XAUUSD) or any other pair, with a focus on high-precision entry, strict risk management (1 trade per day), and partial profit taking. 2. Core Trading Logic Timeframe: M15. Reference Hour: The EA must identify the High and Low of the H1 candle