Method.


Method involves analyzing change of all Symbols describing changes of process along time axis. In doing that local minimas and maximas are being established for every single Symbol. Those minimas and maximas enclose the changes of values of Symbol along time axis with some specific accuracy, defined by percentage of Symbol value specified as constant. To discover local minimas and maximas in past data of process under analysis following procedure is used for every single Symbol :

class CAnalyzer{ private: double m_MinValue; double m_MaxValue; bool m_SearchingForMaximum; double m_ValueChange; double m_MinValueDiffrence; double m_MaxValueDiffrence; double m_LastMinimumMaximumValue; void CheckValues(double val) { double diff = MathAbs(val - m_LastMinimumMaximumValue); if(m_MinValueDiffrence > diff) { m_MinValueDiffrence = diff; } if(m_MaxValueDiffrence < diff) { m_MaxValueDiffrence = diff; } } public: static double NO_RESULT = -1.0; void SetDefaultMinimumMaximum(double val, double valueChange) { m_MinValue = val; m_MaxValue = val; m_ValueChange = valueChange; m_LastMinimumMaximumValue = val; m_MinValueDiffrence = 100; m_MaxValueDiffrence = 0; } double CheckForMinimumMaximum(double val) { double ret = NO_RESULT; if(m_SearchingForMaximum == false && (val - m_MinValue) > m_ValueChange) { ret = m_MinValue; m_SearchingForMaximum = true; m_MinValue = val; m_MaxValue = val; CheckValues(ret); m_LastMinimumMaximumValue = ret; } else if(m_SearchingForMaximum == true && (val - m_MaxValue) < -m_ValueChange) { ret = m_MaxValue; m_SearchingForMaximum = false; m_MinValue = val; m_MaxValue = val; CheckValues(ret); m_LastMinimumMaximumValue = ret; } if (m_MinValue > val) { m_MinValue = val; } if (m_MaxValue < val) { m_MaxValue = val; } return ret; } }; +--------------------------------------------------------+


During finding all Minimas and Maximas for all Symbols. For every symbol there are determined best values(StopLossMulti, TakeProfitMulti) that will be used to calculate StopLoss, TakeProfit for every situation in which there has been determined local Minimum, Maximum, there is defined its value and value of Symbol in time of establishing local Minimum, Maximum called val. Value diff is equal to difference of those values. Algorithm checks all history for StopLossMulti and TakeProfitMulti, by default from range 0.0:3.0, with step 0.03. For every established past local Minimum, Maximum. If RISE operation is being checked than values of StopLoss, TakeProfit are determined as (val - StopLossMulti * diff), (val + TakeProfitMulti * diff). If FALL operation is being checked than values of StopLoss, TakeProfit are determined as (val + StopLossMulti * diff), (val - TakeProfitMulti * diff).


For every Symbol, for its determined StopLoss and TakeProfit values, for all determined Minimas, Maximas and points of determining Minimas, Maximas. There are created Learn Vectors, containing values of Symbols from the range of all values between determine Minimum, Maximum and point of determining that Minimum, Maximum. To the Learn Vector are also added values before determined Minimum, Maximum, by default in range equal 2 times of the range equal to distance between determined Minimum, Maximum and point of determining that Minimum, Maximum. To Learn Vector are also added values of StopLoss and TakeProfit, on output Learn Vector has one value specifying if operation was successfull or failed. For every Symbol there are calculated amounts of successfull and failed operations, from those values there is calculated ratio. If ratio for specific Symbol is greater than value specified in config, than that Symbol will be processed futher.