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
Project Overview I am looking for a high-level Algorithmic Trader / Developer to build a sophisticated, fully automated scalping system for the Nasdaq-100 Future (NQ) . The system must integrate institutional order flow logic with market structure analysis. The core logic must be written in Python , acting as a central hub that bridges ATAS (as the primary data source for Order Flow) and MetaTrader 5 (as the
have the Beatrix Inventor Expert Advisor (EA) that was profitable in the past but has been losing money recently. I need an experienced EA developer/optimizer to study the trade history (especially Stop Loss hits, drawdown periods, SL/TP behavior, win/loss ratio, etc.) and recommend + implement specific tweaks so it becomes consistently profitable again. Your job: 1. Deep analysis of why the EA is no longer
Am looking for an well experienced developer or team to build a basic forex trading automation system connected to MetaTrader (MT4/MT5). The system should allow users to connect their trading accounts and execute trades automatically based on predefined signals or a master trading account. Experience with MetaTrader APIs, trade copying systems, and forex automation is preferred. NOTE: Kindly apply if you have done
Hi, are you able to create a script/indicator on tradingview that displays a chart screener and it allows me to input multiple tickers on the rows. then the colums with be like "premarket high, premarket low, previous day high, previous day low" . When each or both of the levels break, there will pop up a circle on the chart screener, signaling to me what names are above both PM high and previous day high or maybe
Subject: Development of Ultra-High Precision Confluence Indicator - M1 Binary Options (Non-Repaint) Hello, I am looking for a Senior MQL5 Developer to create a custom "Surgical Precision" indicator for MetaTrader 5, specifically optimized for 1-minute (M1) Binary Options trading. The system must integrate three distinct layers of algorithmic analysis. 1. Core Logic: Triple-Layer Confluence The signal (Call/Put)
Looking for an experienced MQL5 developer to design and develop a custom Expert Advisor (EA) for MetaTrader 5. The purpose of this EA is not just automated trading, but also to help me better structure, test, and refine my personal trading strategy
Hi Programmers, I want to create an EA that will make use of the average prices to determine the direction of the market and take bids accurately towards the direction until it reaches the maximum distance for taking bids. It will also consider a profit to loss ratio which will be based on risk as a % of the account balance. As you can see from the picture and the prices showed , the prices represent the manually