Errors, bugs, questions - page 2302

 

Forum on trading, automated trading systems & strategy testing

Correct conversion from double to int

Slava, 2018.09.28 07:10

I'll check in too. Why do you need to normalise the dubs?

First answer. To convert the price so that the trading server can recognise the price as its own, from the same system, rounded correctly, as if it were the server itself rounding.

Is my understanding of the Tester correct?

  1. We send a BuyLimit order using BuyLimit_PriceRequest.
  2. The tester creates a BuyLimit that has BuyLimit_Price = NormalizeDouble(BuyLimit_PriceRequest).
  3. On each tick the tester makes a check (BuyLimit_Price <= Ask) WITHOUT NormalizeDouble.


I.e., the very expensive second step is done to avoid making the third step very expensive. Since there are orders of magnitude more ticks (third step) than OrderSend (second step).


When Digits == 0, NormalizeDouble slows down?

 
Slava:
I have profiled the tester multiple times. And I know where the 'hitch' is there. These are financial calculations, which involve several normalisations of the results to the number of deposit currency digits

Wrapped OrderSend in time measurement and ran it in Optimize mode to avoid single pass logs slowing down and to look at the actual execution time of the function in the Tester.

Got an average execution time of ~4.5µs. This corresponds to 500 NormalizeDouble (I ran the script with this amount)!

So I can say with absolute certainty that it's not normalization that's slowing me down.


It was also interesting to see how much of the Optimize pass is chewed up by OrderSend, compared to the profiler data. Got a match - a quarter to a third.


To repeat the horror I've encountered and what I've been fighting about

Forum on trading, automated trading systems and trading strategies testing

Bugs, bugs, questions

fxsaber, 2018.09.27 17:18

I run Optimize for three hours, and of those hours, one hour is OrderSend

 
Please advise. Why can't I close an order? The terminal says "no price". What can it be?
 
Zhams84:
Please advise. Why can't I close an order? Terminal says "no price". What may it be?

Forum on trading, automated trading systems and trading strategy testing

Bugs, bugs, questions

fxsaber, 2018.07.23 13:56

Keep running into this error

This same error occurs when trying to make a trade request by hand. After ~a minute, suddenly everything starts working again. After a while the error repeats itself.

Forum on trading, automated trading systems and trading strategy testing

Bugs, bugs, questions

Andrey Khatimlianskii, 2018.07.23 14:15

As far as I remember, there is a timeout set there, after which the price is considered hopelessly out of date. That is, if it hasn't changed for 3 minutes, you can't open on it.

Forum on trading, automated trading systems and strategy testing

Bugs, bugs, questions

fxsaber, 2018.07.23 16:46

Wrote a test script of this case. Caught NoPrice 64 seconds after the last tick arrived. Perhaps a minute timeout is indeed worthwhile. I'm going to have to pony up...

Forum on trading, automated trading systems and trading strategy testing

Errors, bugs, questions

fxsaber, 2018.07.23 22:00

Some symbols have a timeout on them, some don't. How do I know the maximum tick age that OrderSend can still pick up (no [No price])?

Forum on trading, automated trading systems and strategy tester

Bugs, bugs, questions

fxsaber, 2018.07.23 23:59

It happens that the last tick received 16 seconds ago is not perceived as relevant to OrderSend. It's probably a bug after all.

Forum on trading, automated trading systems and trading strategy testing

Bugs, bugs, questions

fxsaber, 2018.07.24 09:51

This bug.

Can be reproduced in about a minute with this script on ForexTimeFXTM-Demo01, if you enable all symbols in Market Overview before running it.

 
What is the reason for order tickers in the Tester starting with a two and not a one?
 
fxsaber:
What is the reason for order tickets in the Tester starting with a 2 and not a 1?


1 Ticket - balance


 
Vladislav Andruschenko:

1 ticket - balance

This is a transaction. It was about Orders.

 
fxsaber:

That's the deal. It was about the Warrants.

Maybe it's a legacy from the foursome, where there were only warrants.

 
fxsaber:

That's the deal. It was about the Warrants.


Reasonable question


if you withdraw $100, the order ticket number does not increase.

 

There is a great column in the Tester


And it's sorely lacking in the Terminal and especially in the Visualiser... Please add.

Reason: