Errors, bugs, questions - page 2320

 
fxsaber:

You misunderstood me.


I meant the quoted formula from C++.

I didn't understand anything at all - why should I understand that quote? You made an assumption - I checked it and published it. Since many people just believe what's written on the fence. No one is going to check what is written, you need to do it yourself before it gets too far.

 
Rashid Umarov:

I didn't understand anything at all - why should I bother to look into that quote? You made an assumption - I checked it and posted it. As many people just believe what's written on the fence. No one is going to check what is written, you need to do it yourself before you go too far.

Figured out the C++ code and wrote an example of it. If there was no ban, it would be interesting to hear the response to the given Sharpe divergence example for identical TCs.


Summary:

  • The formula in MT gives the same result for identical TCs.
  • The formula from C++ code shows different results for identical TCs.
 

Forum on trading, automated trading systems and trading strategy testing

Bugs, bugs, questions

fxsaber, 2018.11.06 18:16

And in the formula used in MT, of course, one would not be subtracted. Then the proposed example, no matter how many intervals of 144 are observed, Sharpe would always match.

Because of this unit, the difference would be clearly visible with a small number of trades. For example, 5 and 5*10.

 
fxsaber:

Figured out the C++ code and wrote an example of it. If there was no ban, it would be interesting to hear the response to the given Sharpe divergence example for identical TCs.


Summary:

  • The formula in MT gives the same result for identical TCs.
  • The formula from C++ code shows different results for identical TCs.

I encountered this problem a year ago, I don't know if it has been solved by now.

The FOR loop in MT5 did not work correctly if I used the pre-increment operator for a variable.

The point is that in C++ in many cases pre-increment in such loops gives a small performance gain, but in MT5 it caused only incorrect calculation.

 
Ilham Djumatov:

I encountered this problem a year ago, I don't know if it has been solved by now.

In MT5 loop FOR didn't work correctly if pre-increment operator for a variable was used in it.

The point is that in C++ in many cases pre-increment in such loops gives a small performance gain, but in MT5 it caused only incorrect calculation.

Such statements must be supported by technical details.

Show an example to illustrate the problem

 

Probably a question for the newbie branch. Is there any other way to find out the current time in the Tester?

input int inTimer = 1;
const bool Init = EventSetTimer(inTimer);

void OnTimer()
{
  static datetime TimeTester = TimeCurrent();
  TimeTester += inTimer;
    
  Print(__FUNCTION__ + ": " + (string)TimeCurrent());
  Print(__FUNCTION__ + ": " + (string)TimeTester); // Время Тестера
}

void OnTick()
{
  static bool FirstRun = true;
  
  if (FirstRun)
  {
    DebugBreak();
    
    FirstRun = false;
  }
}


Result

2018.09.03 01:35:45   OnTimer: 2018.09.03 01:35:45
2018.09.03 01:35:46   OnTimer: 2018.09.01 00:00:00
2018.09.03 01:35:46   OnTimer: 2018.09.03 01:35:46
2018.09.03 01:35:47   OnTimer: 2018.09.01 00:00:00
2018.09.03 01:35:47   OnTimer: 2018.09.03 01:35:47
2018.09.03 01:35:48   OnTimer: 2018.09.01 00:00:00
2018.09.03 01:35:48   OnTimer: 2018.09.03 01:35:48
2018.09.03 01:35:49   OnTimer: 2018.09.01 00:00:00
2018.09.03 01:35:49   OnTimer: 2018.09.03 01:35:49
 

Why can't the expiry date of a pending order be set to the nearest second? Saving of computing resources?

To delete a pending order accurate to a second, we have to create an entire system with a timer. There is no way to solve this problem in the tester without the timer (see above).

 
What kind of mistake is this?
2018.11.07 22:15:35.840 Core 1  2018.11.02 16:34:10   failed unknown 184467.4407360955 M FILTER_EURUSD.rann_RannForex at 0.00000 tp: 0.00000 [Invalid request]
 
fxsaber:

Probably a question for the newbie branch. Is there another way to find out the current time in the Tester?

TimeTradeServer().

 
I had several hundred themes in my favourites, all cleared out... Without my knowledge.
Reason: