Gamestudio Links
Zorro Links
Newest Posts
Blobsculptor tools and objects download here
by NeoDumont. 03/28/24 03:01
Issue with Multi-Core WFO Training
by aliswee. 03/24/24 20:20
Why Zorro supports up to 72 cores?
by Edgar_Herrera. 03/23/24 21:41
Zorro Trader GPT
by TipmyPip. 03/06/24 09:27
VSCode instead of SED
by 3run. 03/01/24 19:06
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (Edgar_Herrera, VoroneTZ, Akow), 973 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
sakolin, rajesh7827, juergen_wue, NITRO_FOREVER, jack0roses
19043 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
IB: LotAmount, Multiplier in live trading and Test mode #469653
11/28/17 12:16
11/28/17 12:16
Joined: Feb 2017
Posts: 20
G
Gloria Offline OP
Newbie
Gloria  Offline OP
Newbie
G

Joined: Feb 2017
Posts: 20
Hi,

I'd be most grateful if you could help me with the following question.

I have an IB account and have a strategy that trades two assets: the Dax future (1 contract is 25 times the Dax in EUR, currently about 13000) and the USDJPY cross rate, currently about 110 Yen for one dollar.

How do I need to set LotAmount, Multiplier, Lots, etc. in order to trade
1) 1 Dax Future
2) USD 500,000.00 worth of the USDJPY

I am trying
1) Multiplier = 25; Lots = 1;
2) LotAmount = 25000; Lots = 20;

With the Dax Future, I get the desired behaviour in simulated trading, but when I run a Test in Zorro and take a look at the log file, the profit/loss that is calculated seems to ignore the multiplier. From the log file:
Quote:

Enter 1S DAX-FUT-2017121 at 13:34:00
[DAX-FUT-2017121:strategy:S2701] Short 1@12518.00 at 13:34:00
Units: 1.0000 Margin: 0.00 MCost: 0.1000 PCost: 0.01000
[...]
[DAX-FUT-2017121:strategy:S2701] Exit 1@12384.50: +134 at 19:54:00
Entr 12518.0000 Exit 12384.5000 Spr 0.0000 Slp 0.00$ Rol 0.00$ Com 0.00$

Here, I'd expect a profit of 25*(+134) EUR, but the value of the account increases by only 134.

With the USDJPY, I am totally lost. I thought with LotAmount = 25000 and Lots = 20, I would pay about 25000*110 JPY for one lot which is then worth USD 25000, but that seems not to be what happens. It seems that the position size depends on MarginCost. What does that mean? How do I make sure it always trades the USD 500,000.00 and not anything else?

How do I make sure that the Test does precisely the same as that which happens in live trading?

Thanks a lot for your help,

Gloria

Last edited by Gloria; 11/29/17 13:53.
Re: IB: LotAmount, Multiplier in live trading and Test mode [Re: Gloria] #469683
12/01/17 08:06
12/01/17 08:06
Joined: Jul 2000
Posts: 27,977
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,977
Frankfurt
Multipliers are only used when you trade contracts. If you trade the DAX future directly on an EUR account, use LotAmount = 25, Pip = 0.5 and PipCost = 12.50.

The USDJPY is already in the IB asset list, so you can just take over the parameters. MarginCost is not used by IB, they use Leverage instead. AFAIK the forex leverage is 33.

Re: IB: LotAmount, Multiplier in live trading and Test mode [Re: jcl] #469897
12/12/17 21:34
12/12/17 21:34
Joined: Feb 2017
Posts: 20
G
Gloria Offline OP
Newbie
Gloria  Offline OP
Newbie
G

Joined: Feb 2017
Posts: 20

Thank you so much. I now use the following:

Dax Future (trade 1 contract):
Multiplier = 1;
LotAmount = 25;
Lots = 1;
PIP = 0.5;
PIPCost = 12.50;

USDJPY (trade USD 400,000.00):
Lots = 16;
LotAmount = 25000;
PIP = 0.01;
PIPCost = 25000*0.01;
MarginCost = Margin/Lots;

Now I understand the profit/loss figures can reproduce Zorro's calculation. But there is still a currency issue left:

Trading the Dax future in a EUR account simply give P/L in EUR. But when I trade a fixed USD amount against the JPY at IB, I end up with a P/L in JPY. Fine with me. At certain intervals I am going to exchange these JPY (hopefully) for EUR. But Zorro seems not to know the difference and simply adds Euros to Yen when calculating the strategy profit.

How can I use Zorro in order to study a combination of two strategies one of which has P/L in EUR while the other one produces its P/L in Yen? Ideally, Zorro would tell me the optimum ratio of exposures of the two component strategies that minimizes the overall volatility or drawdown. Is there any way of doing this in Zorro?

Thanks for your help. Kind regards,

gloria

Re: IB: LotAmount, Multiplier in live trading and Test mode [Re: Gloria] #469904
12/13/17 07:36
12/13/17 07:36
Joined: Jul 2000
Posts: 27,977
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,977
Frankfurt
P/L is determined by PipCost. Enter here the value of a pip in your account currency.

Re: IB: LotAmount, Multiplier in live trading and Test mode [Re: jcl] #470042
12/20/17 14:31
12/20/17 14:31
Joined: Feb 2017
Posts: 20
G
Gloria Offline OP
Newbie
Gloria  Offline OP
Newbie
G

Joined: Feb 2017
Posts: 20
Thank you - understand it now.

Kind regards,

gloria

Re: IB: LotAmount, Multiplier in live trading and Test mode [Re: Gloria] #473190
06/20/18 02:39
06/20/18 02:39
Joined: Mar 2017
Posts: 65
G
Ger1 Offline
Junior Member
Ger1  Offline
Junior Member
G

Joined: Mar 2017
Posts: 65
I have issues with LotAmount and Multiplier as well.


I tried trading ES with Lots=1. When setting LotAmount to 50, which is the number of contracts per lot for ES, I get an insufficient funds error message (the demo-account has $1 million capital). I have not set the Multiplier variable.


When I set LotAmount to 1 it works perfectly fine.
Also, I checked the logfile, and units is shown as 50, so it seems that the plugin automatically detects the contracts per lot.


I tried other future contracts too and got the same results.

Could anyone clarify how LotAmount works when trading IB futures?


Moderated by  Petra 

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