Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
7 registered members (clonman, TipmyPip, Niels, dBc, Ed_Love, 3run, 1 invisible), 18,869 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Weird *.trd content #481836
11/06/20 19:20
11/06/20 19:20
Joined: Mar 2019
Posts: 357
D
danatrader Offline OP
Senior Member
danatrader  Offline OP
Senior Member
D

Joined: Mar 2019
Posts: 357
Don't remember trading millions of lots.

Attached Files CheckTrades.png
Re: Weird *.trd content [Re: danatrader] #481861
11/09/20 15:27
11/09/20 15:27
Joined: Jul 2000
Posts: 28,024
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 28,024
Frankfurt
Congratulations! You're rich! wink

If you do not trust your sudden wealth, please contact Support with your script, your asset list, and a somewhat more detailed description of the problem. I can't see from your screenshot what's wrong.

Re: Weird *.trd content [Re: danatrader] #481866
11/09/20 20:06
11/09/20 20:06
Joined: Mar 2019
Posts: 357
D
danatrader Offline OP
Senior Member
danatrader  Offline OP
Senior Member
D

Joined: Mar 2019
Posts: 357
Maybe it is the result of the Lots calculation, added the ceil function.
Funny part, although it shows those enormous Lot amounts, it still resumes the correct amount (normally 0.1, 0.2, or 0.3).


But, no doubt, I would love to be "obere Mittelschicht" or just "durchschnittlich verdienen" laugh

void lots_from_usd_exposure()
{
var ConversionPrice;

string base = strmid(Asset, 0, 3);
switch(base) {
case "USD":
ConversionPrice = 1;
break;
case "JPY":
string current_asset = Asset;
asset(strf("USD/%s", base));
ConversionPrice = 1/priceClose();
asset(current_asset);
break;
case "EUR":
string current_asset = Asset;
asset(strf("%s/USD", base));
ConversionPrice = 1/priceClose();
asset(current_asset);
break;
default:
string current_asset = Asset;
asset(strf("%s/USD", base));
ConversionPrice = priceClose();
asset(current_asset);

//for debugging
//printf("\n%s", Asset);

}

Lots = max(1, total_usd_exposure/ConversionPrice/LotAmount/num_algos/((MaxLong+MaxShort)/2));
}

Re: Weird *.trd content [Re: danatrader] #481871
11/10/20 09:04
11/10/20 09:04
Joined: Jul 2000
Posts: 28,024
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 28,024
Frankfurt
This line is suspicious:

Lots = max(1, total_usd_exposure/ConversionPrice/LotAmount/num_algos/((MaxLong+MaxShort)/2));

If any of the denominators is small or zero, you'll get an insane lot amount.


Moderated by  jcl, Nems, Spirit, Tobias 

Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1