Gamestudio Links
Zorro Links
Newest Posts
Trading Journey
by 7th_zorro. 04/27/24 04:42
Help with plotting multiple ZigZag
by M_D. 04/26/24 20:03
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
M1 Oversampling
by jcl. 04/26/24 11:12
Why Zorro supports up to 72 cores?
by jcl. 04/26/24 11:09
Eigenwerbung
by jcl. 04/26/24 11:08
MT5 bridge not working on MT5 v. 5 build 4160
by EternallyCurious. 04/25/24 20:49
Zorro FIX plugin - Experimental
by flink. 04/21/24 07:12
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (Quad, Akow, 7th_zorro), 756 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
wandaluciaia, Mega_Rod, EternallyCurious, howardR, 11honza11
19049 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: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
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: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
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 | chip programmers | 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