Weird *.trd content

Posted By: danatrader

Weird *.trd content - 11/06/20 19:20

Don't remember trading millions of lots.

Attached picture CheckTrades.png
Posted By: jcl

Re: Weird *.trd content - 11/09/20 15:27

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.
Posted By: danatrader

Re: Weird *.trd content - 11/09/20 20:06

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));
}
Posted By: jcl

Re: Weird *.trd content - 11/10/20 09:04

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.
© 2024 lite-C Forums