Opening, closing in Expert Advisor generated by MQL5 Wizard - page 5

 
Andy:

Vladimir, could you please suggest the meaning of these lines in the standard module of the MA signal: entering the market not at the current price, but on a pullback - how is that?

Lines 241-242 in SignalMA.mqh

You have received the push again but your message is missing. Please duplicate it again.

I cannot tell you what it is for

               //--- suggest to enter the market at the "roll back"
               m_base_price=m_symbol.NormalizePrice(MA(idx));
 
Andy:

So the entry is not at the current price, but at the MA price?


If the input parameter "Price level to execute a deal" == 0.0, the entry will be at the market (at the current price), if the input parameter "Price level to execute a deal" !=0.0, the pending order with an indent from the current price will be placed.

There is no "Mjving Avderage price" for entry.

 
Andy:

Well if you look at this line?


I couldn't find a situation where "m_base_price" was used - that's why I said above:

Forum on Trading, Automated Trading Systems and Strategy Tests

Opening and Closing in Expert Advisor Generated by MQL5 Wizard

Vladimir Karputov, 2017.09.25 15:06


I can't tell you what to do

               //--- suggest to enter the market at the "roll back"
               m_base_price=m_symbol.NormalizePrice(MA(idx));

By the way, you can check it yourself by setting interruptions in places where "m_base_price" values are addressed.

 
Andy:

The Expert Advisors in the scheme are clear, but what is the strongest signal selection branch (block of market patterns) - where is it in MQL5 Wizard? (See the scheme).

Maybe, it's enough to correct the post for the fifteenth time!

 
Andy:

The picture won't load.


Check out:Forum: How to insert image

Also note the extension of the picture you insert - you categorically CANNOT MANUALLY change the file extension of the picture.

 
Andy:

By the way, about opening positions in the standard module of the MA signal - I noticed that the pattern failed puncture almost never triggers, instead of it when the price crosses the indicator in the opposite direction (e.g. indicator goes up, candle goes down) another one triggers, i.e. crossing (indicator and candle go down in the same direction). Why, all settings are default, the value for the opening 10, but the signal force 10, corresponding to the pattern 1, is not triggered, instead of buying on the rebound is selling. In the other side the same thing.


Let's look at theMoving Average indicator signals:

Signal type

Description of conditions

For buying

  • An unformed puncture.The price has crossed the indicator from top to bottom (the Open price of the analyzed bar is above the indicator line and the Close price is below), but the indicator is rising (weak signal on rebound from the indicator line).


and a module of Moving Average indicator signals:

   int               m_pattern_0;      // model 0 "price is on the necessary side from the indicator"
   int               m_pattern_1;      // model 1 "price crossed the indicator with opposite direction"
   int               m_pattern_2;      // model 2 "price crossed the indicator with the same direction"
   int               m_pattern_3;      // model 3 "piercing"

Which of the m_pattern_* is "Unformed Puncture"?

 
Andy:

Pattern 1 - price has crossed the indicator in the opposite direction.


Let's check now: we will draw vertical lines at the pattern triggering points ...

 
Andy:

Somehow strange, almost no such incomplete puncture is caught either in real or in test.


Download, copy to the right place ([data folder]\MQL5\Include\Expert\Signal\SignalMA_OBJ_VLINE.mqh), build on the basis of the Expert Advisor.

Files:
 
Andy:
I'll try it now. What's the reason?

I don't know :) . I only visualised the signals.

 
Andy:
And when are these lines set? On all patterns or only on crossing? It says long on the line but in the Expert Advisor's journal it is short and the lines are not put on every minute although the chart is at M1.

And more details??? Symbol, timeframe, tick generation mode, test dates: from ... to. Screenshot with the name of the line from the tester and at the same time logging. In general, a detailed description.