Questions from Beginners MQL5 MT5 MetaTrader 5 - page 445

 
pr0gre5:

Good afternoon,

I am using the standard library,

Several indicators are generating trading signals

have defined thresholds(ThresholdOpen and ThresholdClose)

How are the trading signals compared?

For example:

-the buy signal of one indicator, it is m_pattern_0 and it is equal to 50,

-but the second indicator tells us to sell, and its m_pattern_1 is 50

but we have not specified anywhere that m_pattern_0 and m_pattern_1 must be compared,

how does this work?

There is an article:MQL5 Wizard: New Version
 

read

Let's calculate the result of the final vote. A weighted forecast obtained from the MA module is calculated as 0.4 * 100 = 40.

Weighted predictionfrom theStochastic module is calculated as 0.8 * (-80) = -64.

Minus-because it turned around.

Indicator

Buy condition - m_pattern_0 int value without a sign

Sell condition -m_pattern_1 int value without a sign

where is the sign from?

 
pr0gre5:

read

Let's calculate the result of the final vote. A weighted forecast obtained from the MA module is calculated as 0.4 * 100 = 40.

Weighted predictionfrom theStochastic module is calculated as 0.8 * (-80) = -64.

Minus-because it turned around.

Indicator

Buy condition - m_pattern_0 int value without a sign

Sell condition -m_pattern_1 int value without a sign

where is the sign from?

I'm busy right now. Either bear with me, or maybe someone else can answer.
 

I will describe the question in more detail, based on theStochastic indicator

article MQL5 MASTER: NEW VERSION

Each of the Signals has its own set of market patterns (a specific combination of price and indicator values).

 //--- "weights" of market models (0-100)
   int               m_pattern_0;      // model 0 "the oscillator has required direction"
   int               m_pattern_1;      // model 1 "reverse of the oscillator to required direction"
   int               m_pattern_2;      // model 2 "crossing of main and signal line"
   int               m_pattern_3;      // model 3 "divergence of the oscillator and price"
   int               m_pattern_4;      // model 4 "double divergence of the oscillator and price"

define values in the constructor

m_pattern_0(30),
m_pattern_1(60),
m_pattern_2(50),
m_pattern_3(0),
m_pattern_4(90)

Variant 2.

At the same time, the Stochastic oscillator has turned downwards and formed a divergence with the price. It is one of the models of Stochastic that implies fall of the price. The significance of this model is 80.

If I understand correctly, it is variant : m_pattern_3; // model 3 "divergence of the oscillator and price".


The weighted prediction fromthe Stochastic module is calculated as 0.8 * (-80) = -64

Question How did the minus appear?



 
pr0gre5:
...
"-" is the direction of the signal downwards. "+" - signal direction upwards.
 

if the indicator value on the last bar is higher than the penultimate bar (value increases) - plus

If the indicator value on the last bar is lower than the penultimate bar (value decreases), then minus

right?

 
pr0gre5:

if the indicator value on the last bar is higher than the penultimate bar (value increases) - plus

If the indicator value on the last bar is lower than the penultimate bar (value decreases), then minus

right?

No. Not the indicator value. Depending on the indicator reading, the signal module of the indicator generates signals. These signals are generated with different strengths and different directions.
 

first time I read the article https://www.mql5.com/ru/articles/488 and missed the point, even though it is highlighted in colour)

First we definea plus sign anda minus sign foropening long orshort positions or forclosing short orclosing long positions respectively. Then we calculated their absolute values for comparison with Signal_ThresholdOpen and Signal_ThresholdClose, which are always with a positive sign.

Thank you for your help!

Документация по MQL5: Стандартная библиотека / Классы торговых стратегий / Модули торговых сигналов
Документация по MQL5: Стандартная библиотека / Классы торговых стратегий / Модули торговых сигналов
  • www.mql5.com
Стандартная библиотека / Классы торговых стратегий / Модули торговых сигналов - справочник по языку алгоритмического/автоматического трейдинга для MetaTrader 5
 
-Aleks-:

I'm not offended - the boss is the boss!

Well, I just hope I can get some sensible answers to my new questions about the code...

Now you can ask questions about the code: GlobalVariable
 
Hello! advise how to make the opening of an order in the ADVISOR by time not 08:00 etc, but at 08:30, I have tried everything, I have a timer input TimeFr=240; which when changed in the test does not open the order