Errors, bugs, questions - page 3103

 

I would like to clarify a question. What I'm most interested in is why the (T* const) pattern is selected in these 2 lines?

Should it work with a pattern (T* &)?

   f1<const X>((const X*) Ptr);           //void func_902::f1<const X>(const X*const)

   f1<const X>((X*)Ptr);                  //void func_902::f1<const X>(const X*const)
 


Forum on trading, automated trading systems and strategy testing

Errors, Bugs, Questions

mktr8591, 2021.11.03 15:43

In b3095 run the script:

template <typename T>
void f1(T* const Ptr) {Print(__FUNCSIG__);}

template <typename T>
void f1(T* & Ptr) {Print(__FUNCSIG__);}


class X {};

void OnStart()
  {
//---
   const X* Ptr = new X;
   
   f1(Ptr);                               //void f1<const X>(const X*&)
   f1<const X>(Ptr);                      //void f1<const X>(const X*&)
   
   //дальше непонятно!
   f1<const X>((const X*) Ptr);           //void func_902::f1<const X>(const X*const)
   f1<const X>((const X* const) Ptr);     //void func_902::f1<const X>(const X*const)
   f1<const X>((X*)Ptr);                  //void func_902::f1<const X>(const X*const)
 
   delete Ptr;
  }

If you remove overload f1(T* & Ptr), all 5 calls return void f1<const X>(const X*const).

Is this some kind of feature?


 
A100 #:

I wanted to write this contradiction in three lines, but it didn't work right away

I don't quite get it...

 
mktr8591 #:

I don't quite get it...

While investigating your question, another (unrelated) bug was discovered

 
A100 #:

While investigating your question, another (unrelated) bug was discovered


Ah, I see... Thank you.

 

Good time everyone !

Installed MT5, connected to the broker (demo account), but it doesn't show me any charts!

Do I have to pay a subscription fee for the service first, or do I have to have real money on the broker's account? I have tried three different brokers and the chart is just black! Please advise who knows what's wrong!

 
Leonidpripa Pripa #:

Good time everyone !

Installed MT5, connected to the broker (demo account), but it doesn't show me any charts!

Do I have to pay a subscription fee for the service first, or do I have to have real money on the broker's account? I have tried three different brokers and the chart is black! Please advise who knows what's wrong!

Which symbol is selected on the chart? Which symbols are there in the Market Watch window (Ctrl-M)?
 

For graphical objects set manually:

1. What is the principle for naming objects?

2. What is the principle of naming objects obtained by copying with Ctrl pressed?

this code:

int    objTotal = ObjectsTotal (0, -1, OBJ_TREND);
string objName = ""; 
for (int i = 0; i < objTotal; i++)
{
  objName = ObjectName (0, i, -1, -1);
  Print (objName, ": ",  (datetime)ObjectGetInteger(0, objName, OBJPROP_CREATETIME));
}

Returns illogical results:

2021.11.09 22:49:25.633 *** Daily Trendline 11478: 2021.11.09 22:49:14

2021.11.09 22:49:25.633 *** Daily Trendline 40235: 2021.11.09 22:49:16

2021.11.09 22:49:25.634 *** Daily Trendline 47128: 2021.11.09 22:49:12

2021.11.09 22:49:25.636 *** Daily Trendline 64191: 2021.11.09 22:49:18

illogical, because it was expected that the numbering of objects in the list goes by creation time (to new or to old).


 

Please make it like the Market Watch- the option of multiple choices at a time so that the menu does not disappear after a tick is placed.

 

AMPGlobalEU broker has trading results (profit) of 0.0 on RUB-denominated accounts, and the commission is consistently charged different from 0.0.

The broker's technical support has taken a week to sort things out and finally decided: install the terminal again and reopen the account. So I did that, hardly believing in the efficacy of such a treatment - nothing has changed in the behaviour of the ruble account.

Dear developers, please sort it out.

There is no problem on USD accounts. I have not checked other accounts, such as EUR and PLN because they are not needed.


Added. Surprisingly, all is well with PLN account.

 
Andrey Dik #:

At AMPGlobalEU on RUB-denominated accounts, trading results (profit) have a value of 0.0, and the commission is correctly charged other than 0.0.


In order for the results to be converted into RUB, the cross-rates like USDRUB, EURRUB should be included in the available cross-rates for the trading accounts.

Reason: