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

Position Summary
http://www.dukascopy.com/swiss/english/forex/jforex/forum/viewtopic.php?f=146&t=57343
Page 1 of 1

Author:  MSCopy [ Thu 14 May, 2020, 16:06 ]
Post subject:  Position Summary

Hallo, is it possibile to get position summary via vjf?

I need to get the amount of total opend positions. If for example 13 positions are open. 7x short with 10.000 and 6 x long with 10.000. Then I have to have the sum and the strategy should indicate that at the moment a sum of 10.000 short is open.

I can program the strategy so that the strategy adds and subtracts the individual positions and thus always gives me the sum. The problem is that sometimes the strategy opens 2 positions at the same time and therefore the strategy can only count 1 position.

So is there a way how I can always get the current sum of the positions?

Ask for your support.

Many thanks

Author:  vadim_berezhnoj [ Tue 19 May, 2020, 16:37 ]
Post subject:  Re: Position Summary

Greetings.

For that you can use Position Viewer going through Open Positions and adding to Sum variable if position is long and subtracting if short.
For more info please attach the strategy file with the problem that you've described.

Regards.

Author:  MSCopy [ Tue 26 May, 2020, 09:54 ]
Post subject:  Re: Position Summary

Hallo, the problem is when the strategy opens 2 positions at the same time due to different entry points. So with the block "LastTradeEvent, Trade Massage Type, Position Filled" you can only calculate one position and the second position remains unknown. Do you have an idea how to avoid this?

Thanx a lot.

Author:  vadim_berezhnoj [ Tue 26 May, 2020, 17:23 ]
Post subject:  Re: Position Summary

If strategy is opening two positions, LastTradeEvent will be triggered two times one by one.
On the first position execution Open Positions amount will be 1, on the second position - it will be 2.

Regards.

  Page 1 of 1