Questions from a "dummy" - page 28

 

At the moment, the template (.tpl) cannot be set in the visualisation mode in the tester. Can it be done programmatically by referring to the ChartSetInteger(), ChartSetDouble(), ChartsetString() functions?

When trying to set the chart appearance in visualization mode, there is an error in the log:

Is this a limitation or am I doing something wrong? There are no errors if I check the operation on the chart in real time mode.

 
tol64:

When trying to adjust the appearance of the graph in visualisation mode, there is an error in the logbook:

Is this a limitation or am I doing something wrong? There are no errors if I check the operation on the graph in live mode.

you were given a specific error in a specific code, even a specific line. look for it.
 
tol64:
If you don't mind, could you give a simple example? Because it's not quite clear to me "the lot can be executed on the available quantity"...

For example, you want to buy 1,000 shares of Cheburashka & Co at, say, 6 quid a share.

You put a pending order for 1,000 shares at this price and wait (in the order using ENUM_ORDER_TYPE_FILLING you specify your desired policy).

Let us assume that at the time the order was to be executed there were only 600 shares available, then depending on the order settings, the following options are possible:

1) The order will take the available 600 shares from the market, and the trade server will automatically fill the order for the missing volume (the missing 400 shares can be defined using ORDER_VOLUME_CURRENT);

2. the order will take the remaining 600 shares from the market, and the server will bluntly report that 400 shares could not be taken (in this case, the trader/MTS will decide about the fate of the remaining volume).

3 The order is either cancelled, or the server waits until there is a volume of 1000 shares (I assume the second option, but will need to clarify).

 
Interesting:

...

Thank you, very clear. It was the situation/action that was needed for understanding.

sergeev:

you were given a specific error in a specific code, even in a specific line. look for it.

That's how it's done in the first place, that's why I'm addressing it. I made it clear that there is no error in real-time mode. In visualization mode, the width of the graph in pixels is not detected and that's why there is a division by zero error in the log. Then I'll try asking the question differently...

Why is there no error in real time mode, but there is an error in the tester in visualization mode?

Документация по MQL5: Стандартные константы, перечисления и структуры / Константы графиков / Свойства графиков
Документация по MQL5: Стандартные константы, перечисления и структуры / Константы графиков / Свойства графиков
  • www.mql5.com
Стандартные константы, перечисления и структуры / Константы графиков / Свойства графиков - Документация по MQL5
 

tol64:

Why is there no error in real time, but there is an error in the tester in visualisation mode?

And no one guarantees that the visualisation works as it should, this is the battery version (which is actively being finalised) .....

If you want, of course you can write to the SD, but if it is really a current fault in the visualiser, it is not sure that it will be fixed quickly (there are probably other issues there as well).

 
Interesting:

And no one guarantees that the visualisation works as it should, this is the battery version (which is actively being finalised) .....

If you want, you can of course write to the SD, but if this is really a current flaw in the visualiser, it's not sure it will be fixed quickly (there are probably other issues there as well).

I think on this issue it is not worth writing to SD yet, since the developers are likely to implement this feature. They do everything by task priority. Yes, I know that the beta is not only the visualizer, but also the platform itself. Just out of inexperience decided to ask the more experienced in the community.
 
The visualisator, like the entire platform, has been in release for a long time. Do not confuse the constant process of releasing new versions with beta status.

Our way of working is constant improvement with frequent builds.
 
Renat:
Our way of working is to continually improve with frequent builds.
When is the next one?
 
Renat:
Visualisotor, like the entire platform, has been in release for a long time. Don't confuse the constant process of releasing new versions with beta status.

Our way of working is continuous improvement with frequent builds.

Oh, I was wrong. A lot of people already have the option to trade in a real account via MT5. Not all of them (which is why I was wrong), but there are already options to choose from. )) So you can write to the service desk about the aforementioned error. But I'm not sure it's not my error. And you should write to SD I think so, when you are sure that the problem is on a global level (terminal side).

Example:

void Set_Shift_Chart()
{
   handle = ChartID();
   width  = (ENUM_CHART_PROPERTY_INTEGER)ChartGetInteger(handle,CHART_WIDTH_IN_PIXELS);

   dbl_x = x;
   dbl_width = width;

   shift = ((dbl_x/dbl_width)*100)+3;     // Вот в этой строке возникает ошибка во время тестирования ТОЛЬКО в режиме визуализации
   
   switch(Color_Scheme)
     {
      case gray:
         Set_Template(handle,true,true,shift,CHART_CANDLES,false,true,true,
                      clrBlack,clrSilver,clrRed,clrWhiteSmoke,C'34,41,45',clrChartreuse,clrGray,clrGreenYellow,clrWhiteSmoke,clrDarkSlateGray); break;
      case red:
         Set_Template(handle,true,true,shift,CHART_CANDLES,false,false,true,
                      clrBlack,clrSilver,clrRed,clrWhiteSmoke,C'37,37,37',clrLemonChiffon,clrOrangeRed,clrGreenYellow,clrKhaki,C'132,0,3'); break;
     }
}

What am I making a mistake about?

 
tol64:

Oh, I was wrong. A lot of people already have the option to trade in a real account via MT5. Not all of them (which is why I was wrong), but there are already options to choose from. )) So you can write to the service desk about the aforementioned error. But I'm not sure it's not my error. And you should write to SD I think so, when you are sure that the problem is on a global level (terminal side).

Example:

What am I making a mistake about?

It's logical to assume that 0 is returned instead of number of pixels :)

idth  = (ENUM_CHART_PROPERTY_INTEGER)ChartGetInteger(handle,CHART_WIDTH_IN_PIXELS);

Put a check on the result of this line and handle the division by 0.

And as for returning 0 instead of pixels, that's direct to SD...

Reason: