Questions from Beginners MQL5 MT5 MetaTrader 5 - page 1038

 
Evgeny Dyuka:
Is it possible to disable strategy tester logs in MT5? I don't have any spare Print, but I have 20Gb overnight, VPS is jammed. I have strategy running on 7 pairs and up to 10 trades per day for each...

Just a thought.
If I want to monitor logs directory and delete unnecessary stuff from it. Or try to prohibit the terminal to write in this directory.
Frankly speaking, I haven't tried it, but one of the options must help. Of course writing ban may fail because of probability of terminal error. But side directory cleaning is quite harmless variant.

 
Konstantin Nikitin:

A side directory cleanup, on the other hand, is a harmless option.

The same will not work, MT "occupies" the file and it will not be deleted until you close MT. If, like everyone else, logs were divided into files by volume, then yes, but MT stupidly writes in one until the test is over.

 
psyman:

How do I change the colour of an order line or an open position?

Right now they are all the same green, which causes confusion, and I can't find them by brute force

Only the objects created by the user are available.

We should try all orders and positions, and for each type, draw a horizontal line of the required colour and style.

 
Vitaly Muzichenko:

You have to go through all the orders and positions, and draw a horizontal line of the desired colour and style for each type of price.

It sucks that two lines turn out instead of one.

I sometimes drag orders with a mouse, but this crutch is not a good solution :-)

 
psyman:

It sucks that you get two lines instead of one.

I sometimes drag and drop orders with my mouse, it's not much of a crutch :-)

Everything will drag and work

 

Question about OnChartEvent() reaction
Spinning the mouse wheel away from myself, I get: event = 9 lparam = 0 dparam = 0.0 sparam =
Spinning it towards myself, I get nothing.

Please give your comments.

 
User_mt5:

Question about OnChartEvent() reaction
Spinning the mouse wheel away from myself, I get: event = 9 lparam = 0 dparam = 0.0 sparam =
Spinning it towards myself, I get nothing.

Please give your comments.

Because ID = 9 irrespective of the direction of rotation of the wheel.

 
User_mt5:

Please give your comments.

where is your code that doesn't work?

here's the code I checked from the help - it works:https://www.mql5.com/ru/docs/constants/chartconstants/enum_chartevents#chartevent_mouse_wheel

Have you allowed scrolling wheel messages to be accepted in your code?

init OnInit() 
  { 
//--- включение сообщений о прокрутке колесика мышки 
   ChartSetInteger(0,CHART_EVENT_MOUSE_WHEEL,1); 
//--- принудительное обновление свойств графика гарантирует готовность к обработке событий 
   ChartRedraw(); 
//--- 
   return(INIT_SUCCEEDED); 
  } 
Документация по MQL5: Константы, перечисления и структуры / Константы графиков / Типы событий графика
Документация по MQL5: Константы, перечисления и структуры / Константы графиков / Типы событий графика
  • www.mql5.com
Существуют 11 видов событий, которые можно обрабатывать с помощью функции предопределенной функции OnChartEvent(). Для пользовательских событий предусмотрено 65535 идентификаторов в диапазоне от CHARTEVENT_CUSTOM до CHARTEVENT_CUSTOM_LAST включительно. Для генерации пользовательского события необходимо использовать функцию EventChartCustom...
 
Alexey Viktorov:

Because ID = 9 irrespective of the direction the wheel is turned.

I think the MT is far from perfect, but not that far.

Thank you.

 
Igor Makanu:

where is your code that doesn't work?

here's the code I checked from the help - it works:https://www.mql5.com/ru/docs/constants/chartconstants/enum_chartevents#chartevent_mouse_wheel

Have you allowed the scrolling wheel messages to be accepted in your code?

Yes, I should have presented the code. But it's simple: in the OnChartEvent() function the first line is print:
void OnChartEvent(const int     event, 
                  const long&   lparam,
                  const double& dparam,
                  const string& sparam 
                  )
   {
   Print(" event = ", event, "    lparam = ", lparam, "    dparam = ", dparam , "    sparam = ", sparam  ); 

Probably not enough...

You have provided program lines, the contents of which I will look at in detail and experiment with. Maybe that will solve the issue.

Thank you very much!

Reason: