Errors, bugs, questions - page 2430

 
template <typename T>
string GetTypeName( T )
{
  return(typename(T));
}

void OnStart()
{
  Print(GetTypeName(fabs((uint)0))); // uint
}


This signature

template <typename T>
T fabs( T );
 
Igor Zakharov:

for the ulong type, the function fabs returns the ulong type. cast to a signed type within fabs or after fabs or to an unsigned type to the right

 

fxsaber:

TheXpert:

Now I see...

Thank you!

Added: the help doesn't have this - it only says double.
 
Apparently, TheXpert was banned by mistake.
 

@Slava, I have asked several times to disclose the opt-format, but there has been no response.

Is it possible to disclose the mqd-format? There may be several mqd-files in Files\Tester now, but there is not only no possibility to choose the right one. Sometimes Frame-reading doesn't work if you wait some time after the optimisation is completed.

We don't want to lose important data obtained in an mqd-file during long optimizations. Therefore, opening the mqd-format would greatly help to solve this problem.

 
fxsaber:

@Slava, I have asked several times to disclose the opt-format, but there has been no response.

Is it possible to disclose the mqd-format? There may be several mqd-files in Files\Tester now, but there is not only no possibility to choose the right one. Sometimes Frame-reading doesn't work if you wait some time after the optimisation is completed.

You don't want to lose important data obtained in an mqd-file during long optimizations. Therefore, opening the mqd-format would greatly help to solve this problem.

There is a long overdue need for such a feature. The suggestion to repeatedly load optimization results to the tester was repeatedly voiced.

This need can be resolved through reading mqd-files from MQL-programs.

 
To start with, the problem of losing frames from agents would be solved and that would be good...
 
Comments not related to this topic have been moved to "Any questions from newbies on MQL4, help and discussion on algorithms and codes".
 

If the indicator is assigned the DRAW_HISTOGRAM plot type, it will not be wider than a candlestick no matter how hard you try to increase the width of the histogram.

I think there is no point in publishing the full code, but the part responsible for the width of the histogram in two variants

#property indicator_separate_window
#property indicator_buffers 1
#property indicator_plots   1
#property indicator_type1  DRAW_HISTOGRAM
#property indicator_style1  STYLE_SOLID
#property indicator_color1  clrOlive
#property indicator_width1 5


int OnInit()
{
 SetIndexBuffer(0, buffer, INDICATOR_DATA);
 PlotIndexSetInteger(0, PLOT_LINE_WIDTH, 5);
 PlotIndexSetDouble(0, PLOT_EMPTY_VALUE, 0.0);
  return(INIT_SUCCEEDED);
}

I checked the selected strings one by one and together as now... Nothing works.

Is this a special feature or a bug?

 
Alexey Viktorov:

If the indicator is assigned the DRAW_HISTOGRAM plot type, it will not be wider than a candlestick no matter how hard you try to increase the width of the histogram.

I think there is no point in publishing the full code, but the part responsible for the width of the histogram in two variants

I checked the selected strings one by one and together as now... Nothing works.

Is this a special feature or a bug?

Maximum width value = 8. And, yes, when the graph is zoomed out, the width of the bar graph columns is automatically adjusted. When zoomed in, it will not be wider than 8.

Reason: