Errors, bugs, questions - page 1792

 
Andrey Sokolov:
There seems to be very little slippage.
So everything should match perfectly. Question to all providers, do your stats in Signals and master accounts match?
 
fxsaber:
So everything should match perfectly. Question to all providers, do your stats in Signals and master accounts match?
These are just signals, they are not priced in. The point here is that the price in red on the Signal page is the yellow line at the time where it crosses the vertical line.
 

Compilation error

class A {};
template<typename T>
class B {};
void OnStart()
{
        B<A const> a; //Error: 'const' - comma expected
}
 
Andrey Sokolov:
These are just the Signals, they are not priced in.
Well then, where do the figures in the stats of the Signals themselves come from?
 
A100:

Compilation error

B<const A> a;
 
fxsaber:

The previous entry is more general in macro substitution

#define MACRO( X ) \
void f( const X ) {} \     //(*)
void g( X const ) {}

MACRO( int )       //нормально
MACRO( const A * ) //ошибка: здесь (*) причина
 
A100:

The previous entry is more general in macro

X const: X can be both int and const A

const X: here X cannot be const A

Yes, I hadn't thought about the macro.
 
Alexey Kozitsyn:
You select the right story, go through the orders and look at their commissions, swaps, profits.
Thanks, I didn't look carefully at the tutorial. :=)
 

There are two variables of the same type - not a simple structure (contains objects), for example, MqlTradeRequest.

How to make one variable a copy of the other? Without prescribing a copy of each field of the structure.

And is it possible to write such a function?

MqlTradeRequest Function();
So that the function would not return a simple structure.
 
struct STRUCT
{
  ~STRUCT()
  {
    Print(__FUNCTION__);
  }
};

STRUCT f()
{
  STRUCT Struct;
  
  return(Struct);
}

void OnStart()
{
  f();
}
Result
STRUCT::~STRUCT
STRUCT::~STRUCT
STRUCT::~STRUCT
Why three times and not two?