Gamestudio Links
Zorro Links
Newest Posts
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
M1 Oversampling
by 11honza11. 04/30/24 08:16
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (AndrewAMD), 989 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
firatv, wandaluciaia, Mega_Rod, EternallyCurious, howardR
19050 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Impossible Equity #479819
04/28/20 03:51
04/28/20 03:51
Joined: Aug 2019
Posts: 22
F
felixfx Offline OP
Newbie
felixfx  Offline OP
Newbie
F

Joined: Aug 2019
Posts: 22
I'm testing a script wrote on EUR/USD and before each trade is initiated I have the console prinf out the account equity like so:

printf("%f Equity" Equity);

The starting Capital is $1M and it will give me back numbers like these:
1000289.799133
1000536.611633

For every 1 tick per Zorro Lot of movement on EUR/USD, 1 Zorro Lot = 0.01 Lot, is equivalent to $0.01.

How could there possibly be Equity values of 6 decimal places?

This is clearly incorrect. Not just equity but other calculations I have having printed out are giving me these highly decimaled numbers as well.

Anyone have any idea how to fix this?

Thank you

Re: Impossible Equity [Re: felixfx] #479820
04/28/20 09:31
04/28/20 09:31
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
I like the word 'decimaled'. For getting less decimaled numbers, set the decimalization to 2 digits with "%.2f".


Moderated by  Petra 

Powered by UBB.threads™ PHP Forum Software 7.7.1