0 registered members (),
470
guests, and 7
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Re: New Zorro version 2.30
[Re: jcl]
#481076
08/05/20 15:30
08/05/20 15:30
|
Joined: Jul 2017
Posts: 784
Zheka
User
|
User
Joined: Jul 2017
Posts: 784
|
The manual says otherwise: If the TMF is passed to an enter command, it can receive up to 8 additional var parameters following the function name: enterLong(MyTMF, parameter1, parameter2...). They must also appear in the function's parameter list and keep their values during the lifetime of the trade. The global manage function has no parameters. Also, 2-minute difference is 0.00138888. If there is any rounding involved internally, downcasting a var to a float, this shouldn't cause difference up in the 3-rd significant digit.
|
|
|
Re: New Zorro version 2.30
[Re: jcl]
#481079
08/05/20 17:58
08/05/20 17:58
|
Joined: Jul 2017
Posts: 784
Zheka
User
|
User
Joined: Jul 2017
Posts: 784
|
I meant 3rd decimal digit, sorry. But this line: print(TO_LOG,"\n wdate as var=%.7f, wdate in float=%.7f, %s", wdate(0), (var)(float)wdate(0), strdate(HMS,(var)(float)wdate(0) ) ); when run in lite-C indeed shows 1:52 min difference after downcasting, but in C++ both values are exactly the same. The difference is quite significant, how come?
|
|
|
Re: New Zorro version 2.30
[Re: jcl]
#481081
08/05/20 18:40
08/05/20 18:40
|
Joined: Feb 2017
Posts: 1,725 Chicago
AndrewAMD
Serious User
|
Serious User
Joined: Feb 2017
Posts: 1,725
Chicago
|
Maybe your recast is incomplete in C++? Declare and initialize a float to the value, and use that instead. Then your floating precision should actually decay. Also, significant figures are quite relevant: https://www.geeksforgeeks.org/difference-float-double-c-cpp/float is a 32 bit IEEE 754 single precision Floating Point Number (1 bit for the sign, 8 bits for the exponent, and 23* for the value), i.e. float has 7 decimal digits of precision.
double is a 64 bit IEEE 754 double precision Floating Point Number (1 bit for the sign, 11 bits for the exponent, and 52* bits for the value), i.e. double has 15 decimal digits of precision.
|
|
|
Re: New Zorro version 2.30
[Re: jcl]
#481096
08/06/20 14:09
08/06/20 14:09
|
Joined: Jul 2017
Posts: 784
Zheka
User
|
User
Joined: Jul 2017
Posts: 784
|
Caused by setting an entry stop, but entering via TMF Its pretty normal to have some initial Entry, but modified later in a tmf. I actually needed a 'bracket' order, setting a limit via Entry and then adding a stop in a tmf. Which led to some 'great results' in backtesting, but failed in live. Would be great if Zorro had a bracket order functionality out of the box. This will be fixed in the next update You mean the entry price will be correct and not 1-tick earlier (without having to set TradeEntryLimit=0 before that)?
Last edited by Zheka; 08/06/20 14:20.
|
|
|
|