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

仕事が完了した

実行時間54 分
依頼者からのフィードバック
Great!

指定

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.


応答済み

1
開発者 1
評価
(253)
プロジェクト
358
49%
仲裁
24
25% / 50%
期限切れ
80
22%
暇
2
開発者 2
評価
(88)
プロジェクト
143
39%
仲裁
21
19% / 48%
期限切れ
30
21%
暇
類似した注文
I am looking for an experienced MQL5 developer to perform a comprehensive technical audit, debugging, repair, and testing of my existing MT5 Expert Advisor. Project: EA_Trend_Advanced V296 RC25 Fix14 Market: XAUUSD (Gold), M5 Budget: $300 USD This is an existing complex EA with multiple MQ5/MQH modules. I do NOT want a new trading robot or a completely redesigned strategy. 1. Main Problems Investigate why the EA
Hello International Developer, I need LIFETIME MT5 EA for XAUUSD Gold. REQUIREMENTS: 1. Lifetime bot - No expiry date, unlimited accounts, unlimited installations 2. Must include source code .mq5 file - This makes it lifetime 3. Every trade MUST have Stop Loss 300 points and Take Profit 600 points 4. No martingale, No grid, No averaging - Clean safe strategy 5. Auto lot size = 1% risk per trade for good margin growth
Hello MQL5 Developers, I am looking for a professional, ready-made indicator for MetaTrader 5 (MT5), specifically designed or optimized for Gold (XAUUSD). Required Features: Clear BUY/SELL signals with entry prices, Stop Loss (SL), and multiple Take Profit (TP) targets drawn directly on the chart. Strong areas of interest, including support and resistance, liquidity zones, supply and demand zones, and potential
Expert advisor 150+ USD
Hiring: Forex Strategist & MQL5 Developer for Long-Term EA Development I am looking for an experienced Forex Strategist and MT5 (MQL5) Developer to work with me on an ongoing project to develop, test, improve, and optimize a profitable Forex Expert Advisor (EA). My Message to the Developer My budget is $150 . However, this is not intended to be a one-time payment for a finished product. I want an ongoing working
فيما يخص المتداولين من سلطان التداول وحتى المبتدى والضائع في أكبر سوق عالمي في التداول ااوكد لكم ان الاستشاره البسيطه من من يملك الاستراتيجيه المثلى في التداول والخبره الطويله في مجال التداول قد تغير مستقبلك
Hello developers,I am looking for an experienced MQL5 developer to create an EA based on Moving Average retest strategy with advanced recovery system.The concept is simple: Entry is based on MA close and retest. Initial trade has small TP and no SL.If price goes against the initial position, the EA should manage it using:Opposite hedge tradePending limit grid systemBasket take profitMartingale lot multiplier after
Hi Traders, I am an MQL5 Developer with a strong background in building custom MetaTrader 5 Expert Advisors (EAs). I have developed an efficient, high-precision entry & exit logic that focuses on clean execution and smart risk management. Whether you want to consult on strategy design, integrate this logic into your trading setup, or turn your own system into a fully automated EA, I am here to help! I am currently
Professional MQL5 developer available for custom Expert Advisor (EA) and Indicator development on MetaTrader 5. What I can build: Custom EA based on your strategy rules (SMC, FVG, Price Action, Indicators) Risk & Money Management modules (Auto Lot, Daily Loss Limit, Trailing Stop) Real-time Alerts (Telegram, Email, Mobile Push Notification) Code Optimization & Bug Fixing for existing MQL5 programs Workflow: Please
Thujkkds 30 - 200 USD
Me and I will be there thank you for your help and sub and sub and sub in the morning to get the season and the screen is on the way home now and I will motho
I’m looking for an experienced MQL5 developer to create a high-frequency trading bot similar to those used for passing prop firm challenges , customised to my requirements. The EA should support ultra-fast entries and exits, hundreds of trades within short sessions, and advanced pending-order strategies. I have reference videos showing the exact trading style I want. Budget: $100–$200 (negotiable). Only experienced

プロジェクト情報

予算
30 - 35 USD
締め切り
最高 3 日