Experts: VR---ZVER v.2 - page 6

 
Vladimir Karputov:

Where did you get the coloured lines on the chart???? In the code.

VR---ZVER v.2(barabashkakvn's edition).mq5

version "2.003"

the usual iMA indicators are used!

I threw the averages on the chart, such as in the settings of the Expert Advisor. Does it have its own? I had nothing on the chart. How to switch them on?
 

The code works according to the given algorithm.

You can always see the algorithm itself in MetaEditor.

 
Vladimir Karputov:

The code works according to the given algorithm.

You can always see the algorithm itself in MetaEditor.

Thank you, but where can I see the algorithm there? And about coloured lines, do I need to add them myself or not?
 
Shara1:
Thanks, but where can I see the algorithm? And about the coloured lines, do I need to add them myself or not?
The code is viewed and edited in MetaEditor.
 
Vladimir Karputov:
The code is viewed and edited in MetaEditor.

I understand that I need to add 3 moving iMA indicators to the chart , they are not available in MetaTrader by default. Can you use this one? https://www.mql5.com/en/code/146

Thank you.

Индикатор Index Moving Average
Индикатор Index Moving Average
  • votes: 14
  • 2010.07.26
  • Vladimir Mikhailov
  • www.mql5.com
На представленном рисунке видно, что направление движения индикатора совпадает с направлением дневных баров. Локальные максимумы и минимумы индикатора соответствуют точкам разворота локального тренда. Индикатор является опережающим и показывает темп изменения цены и предполагаемый разворот цены. Картинка: Значение индикатора...
 

This code will sometimes generate errors

//+------------------------------------------------------------------+
//| Delete AllOrders|
//+------------------------------------------------------------------+
void DeleteAllOrders()
  {
   for(int i=OrdersTotal()-1;i>=0;i--) // returns the number of current orders
      if(m_order.SelectByIndex(i))     // selects the pending order by index for further access to its properties
         if(m_order.Symbol()==m_symbol.Name() && m_order.Magic()==m_magic)
            m_trade.OrderDelete(m_order.Ticket());
  }

You need to check ORDER_STATE. I wonder if this code will pass the Market or not?


The correct variant

void DeleteAllOrders()
  {
   for(int i=OrdersTotal()-1;i>=0;i--)
      if(m_order.SelectByIndex(i) && (m_order.State() == ORDER_STATE_PLACED))
         if(m_order.Symbol()==m_symbol.Name() && m_order.Magic()==m_magic)
            m_trade.OrderDelete(m_order.Ticket());
  }
 
Great but will there be a mt4 version?
 
John Suka :
Great but will there be a mt4 version?

Not. Your question is very strange :)

The old terminal has not been developed for a long time.

 

Good day to all honoured participants )

I would like (with the author's permission) to improve the Expert Advisor a little, increasing the discreteness of the current price level polling in order to timely correct the stop loss level (within the framework of the trawl and breakeven algorithms).

In version 2.004, the correction of the stop loss level is carried out only at the moment of opening a new candle. Because of this, in my opinion, on large timeframes the possible profit, which could be obtained on positive candlestick shadows, is missed. I believe that the algorithm of trawl and breakeven should include a discreteness level not exceeding 0.1 seconds.

I ask for authoritative opinions on the essence of the above and suggestions on ways of implementation.

 
Vladimir Karputov #:

Not. Your question is very strange :)

The old terminal has not been developed for a long time.

AND YET its still here! haha!