Discussion of article "MQL5 Wizard techniques you should know (Part 03): Shannon's Entropy"

 

New article MQL5 Wizard techniques you should know (Part 03): Shannon's Entropy has been published:

Todays trader is a philomath who is almost always looking up new ideas, trying them out, choosing to modify them or discard them; an exploratory process that should cost a fair amount of diligence. These series of articles will proposition that the MQL5 wizard should be a mainstay for traders.

Claude Shannon in 1948 introduced his paper “A mathematical theory of communication” that had the novel ideal of information entropy. Entropy is a concept from physics. It is a measure of the extent to which particles within an object are active. If we consider the 3 states of water namely ice, liquid and vapor for example; we can see that the particle kinetic energy is highest in vapor and least in ice. This same concept is applied in mathematics via probability. Consider the following three sets.

Set 1: 

Set 1


Set 2: 

Set 2


Set 3: 

Set 3


If you were to guess which one of these sets would have the highest entropy? 
If you picked the last then you’re right but how do we validate that answer? The simplest way of answering this could be by taking the number of ways you can re-organize each set as the entropy estimate while ignoring similar color stretches. For the first set there is therefore only one way of ‘re-arranging’ it, however as we look at the sets after clearly the number of permutations with respect to color do increase significantly thus you could argue the last set has the highest entropy.

Author: Stephen Njuki

 

There's issues with this signal generator.  The code itself is doesn't make sense.

I started noticing issues when line 158 was incorrect.  You're creating __INPUTS number of rules when it should be

__RULES.


I understand that the decision forest is used during optimization , but  what's the point when you're not

reading it for non-optimized runs.  It seems like the decision forest is used to verify something but contributes nothing to the signal decision. 

And ,if you are using the decision forest, then the usage is not explained ( or requires prior knowledge). Here : 


CDForest::DFProcess(DF,m_in_calculations,m_out_calculations);

   m_update.B(m_out_calculations[1]);


You're changing the profile of the neutral set. This does effect the signal ,but could you explain how and why, please.

Everything else is excellent.