Dukascopy Support Board
http://www.dukascopy.com/swiss/english/forex/jforex/forum/

Problem with restricting lot amount in live account
http://www.dukascopy.com/swiss/english/forex/jforex/forum/viewtopic.php?f=141&t=51113
Page 1 of 1

Author:  mrlfx [ Tue 22 Apr, 2014, 14:56 ]
Post subject:  Problem with restricting lot amount in live account

Hi, I have a strategy that is running in live account. But I am having huge problem now with the leverage. In the trading logic, I wanted to trade upto 5 open positions with a single lot size of 0.006. So I used a 0.03 (0.006 x 5=0.03) lot to restrict the lot amount in the block with all position data.

But in live condition, I have found instances where it will trade upto 0.054 lots (9 open position of 0.006 lot) even as the maximum open lot allowed is set at 0.03 lot. Is my IF logic inherently wrong or is there a way to rectify since its very dangerous to run it live.

Image

Attachments:
strategybug.jpg [148.43 KiB]
Downloaded 335 times

Author:  dirk_r1 [ Tue 22 Apr, 2014, 18:17 ]
Post subject:  Re: Problem with restricting lot amount in live account

Greetings!

I kindly ask you to provide us the strategy in order to investigate.

In case you want to handle is confidentially, you can also write an email to [email protected].

Author:  mrlfx [ Wed 23 Apr, 2014, 01:03 ]
Post subject:  Re: Problem with restricting lot amount in live account

Please find the strategy.

Attachments:
mutlplepositions.vfs [46.11 KiB]
Downloaded 142 times

Author:  dirk_r1 [ Thu 24 Apr, 2014, 10:21 ]
Post subject:  Re: Problem with restricting lot amount in live account

Hello and thank you for the provided strategy.

I found the bug :)

If you want to refer to trade amount of several positions (as a sum) you need to setup like this:
I know that it is a bit confusing... Everything below "Positions Info" refers to the number (amount) of positions (integer), while when you have created an array (=positions Viewer) you can determine the trade amount of all positions for example.

Attachments:
PosTradeAmount.vfs [29.76 KiB]
Downloaded 150 times

Author:  mrlfx [ Thu 24 Apr, 2014, 12:33 ]
Post subject:  Re: Problem with restricting lot amount in live account

dirk_r1 wrote:
Hello and thank you for the provided strategy.

I found the bug :)

If you want to refer to trade amount of several positions (as a sum) you need to setup like this:
I know that it is a bit confusing... Everything below "Positions Info" refers to the number (amount) of positions (integer), while when you have created an array (=positions Viewer) you can determine the trade amount of all positions for example.


Thanks. :)

But the logic seems difficult to understand if I have to write it. Could you give me some tips on how to write and the logic behind. Some links or tutorial should be good.

Author:  dirk_r1 [ Fri 25 Apr, 2014, 14:44 ]
Post subject:  Re: Problem with restricting lot amount in live account

Greetings!

We have several video-tutorials on youtube: https://www.google.lv/search?q=youtube+ ... yAOPg4HIDw

If you need more info please specify :)

Nice weekend!

  Page 1 of 1