Errors, bugs, questions - page 1607

 
threat:
In my case this is not an option, as there are a lot of objects - they are grid lines instead of the standard one. Because of the read only restriction, the ability to "raise" and "lower" objects "by height" is lost. It's a strange and inconvenient limitation. It just gets in the way.

There is a way to programmatically pull the object to the top.

First make the object invisible on all timeframes, then make it visible again.

This is exactly how it is done in panels

 
threat:
A strange and inconvenient restriction. It just gets in the way.

This is the object's creation time.

You want the right time for the object - create the object at the right time. What do you want?

 
Slawa:

This is the object's creation time.

You want the right time at the object - create the object at the right time. How did you want it?

That's not what he wanted. to "raise" and "lower" objects.
 
Slawa:

There is a way to programmatically pull the object to the top.

First make the object invisible on all timeframes, then make it visible again.

That's how it's done in the panels

How do you do that? I do not understand ...

In my panels, for example, I hide unnecessary elements outside the chart...

 
Slawa:

There is a way to programmatically pull the object to the top.

First, make the object invisible on all timeframes and then make it visible again.

This is how it is done in the panels

How do I move the object to the bottom? You'd better create an additional layer field and sort objects by layers instead of date of creation. Or snap to existing property OBJPROP_ZORDER
 
Vladimir Pastushak:

How's that? I don't understand ...

In my panels, for example, I hide unnecessary elements outside the chart...

Like this:

//+------------------------------------------------------------------+
//| Показывает кнопку                                                |
//+------------------------------------------------------------------+
void CColorButton::Show(void)
  {
//--- Выйти, если элемент уже видим
   if(CElement::IsVisible())
      return;
//--- Сделать видимыми все объекты
   for(int i=0; i<CElement::ObjectsElementTotal(); i++)
      CElement::Object(i).Timeframes(OBJ_ALL_PERIODS);
//--- Состояние видимости
   CElement::IsVisible(true);
  }
//+------------------------------------------------------------------+
//| Скрывает кнопку                                                  |
//+------------------------------------------------------------------+
void CColorButton::Hide(void)
  {
//--- Выйти, если элемент скрыт
   if(!CElement::IsVisible())
      return;
//--- Скрыть все объекты
   for(int i=0; i<CElement::ObjectsElementTotal(); i++)
      CElement::Object(i).Timeframes(OBJ_NO_PERIODS);
//--- Состояние видимости
   CElement::IsVisible(false);
  }
//+------------------------------------------------------------------+
//| Перерисовка                                                      |
//+------------------------------------------------------------------+
void CColorButton::Reset(void)
  {
//--- Выйдем, если элемент выпадающий
   if(CElement::IsDropdown())
      return;
//--- Скрыть и показать
   Hide();
   Show();
  }
 
Vladimir Pastushak:

How's that? I don't understand ...

In my panels, for example, I hide unnecessary elements outside the chart...

Here, for example...

//+------------------------------------------------------------------+
//| Display object on chart                                          |
//+------------------------------------------------------------------+
bool CPanel::OnShow(void)
  {
   return(m_rectangle.Timeframes(OBJ_ALL_PERIODS));
  }
//+------------------------------------------------------------------+
//| Hide object from chart                                           |
//+------------------------------------------------------------------+
bool CPanel::OnHide(void)
  {
   return(m_rectangle.Timeframes(OBJ_NO_PERIODS));
  }

That's exactly the technique I was talking about.

Your method differs from Timeframes(OBJ_NO_PERIODS) in that it doesn't change the order in which the objects are drawn

 
Slawa:

Here, for example.

This is the technique I was talking about.

Your method differs from Timeframes(OBJ_NO_PERIODS) in that it doesn't change the order in which objects are drawn

I'm confused, I want to clarify Timeframes(OBJ_NO_PERIODS) can change the order in which objects are drawn?

In my case, the order is image A, image B, image C.

By usingOBJ_ALL_PERIODS can the order be changed to any other ? B C A ????

 
Hello. I am facing the following problem - I downloaded metatrader 5 terminal from bx company, everything is fine except that when I run any advisor in the terminal (either built-in or my own) in the strategy tester, the orders do not open. There are no errors in the logs. The same EAs work in other terminals without any problems. Their technical support offers their help and says it is not their problem. Maybe you have some ideas how to open orders in the strategy tester?
 
Danil Nesterov:
Hello. I have got the following problem, I downloaded Metatrader 5 terminal from Bx company, everything is great except that I have no orders open in the strategy tester during the run of any EA (either built-in or my own). There are no errors in the logs. The same EAs work in other terminals without any problems. Their technical support offers their help and says it is not their problem. Maybe you have some ideas how to open orders in the strategy tester?

What is the build of the terminal? If you connect to another trade server in the same terminal (did you know that you can connect to any trade server from one terminal?) - how will the EAs behave?

Insert a screenshot of the strategy tester, tab "Settings" here. Let's see what the settings are there.