Dukascopy
 
 
Wiki JStore Search Login

Attention! Read the forum rules carefully before posting a topic.

    Try to find an answer in Wiki before asking a question.
    Submit programming questions in this forum only.
    Off topics are strictly forbidden.

Any topics which do not satisfy these rules will be deleted.

How can I count my active positions and Limit the amount to eg 5
 Post subject: How can I count my active positions and Limit the amount to eg 5 Post rating: 0   New post Posted: Tue 12 Apr, 2016, 13:45 
User avatar

User rating: 0
Joined: Fri 18 Dec, 2015, 13:33
Posts: 14
Location: United KingdomUnited Kingdom
Hello there,

I have positions opening in intervals of eg 30 seconds and cannot figure out how to count and then limit the number of positions...Can someone point me in the right direction or provide an example....

Many Thanks :D


 
 Post subject: Re: How can I count my active positions and Limit the amount to eg 5 Post rating: 0   New post Posted: Tue 12 Apr, 2016, 16:08 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
Hello,

Yes, it's possible to archive that by using ScheduledExecutorService Interface (Take a look at:Java API)

And there's an example how to make usage of it. Take a look here

However, you have to take care of order closing (see How to close orders)

Additional resources : JForex API, JForex Wiki

Good luck and have a nice day


 

Jump to:  

cron
  © 1998-2025 Dukascopy® Bank SA
On-line Currency forex trading with Swiss Forex Broker - ECN Forex Brokerage,
Managed Forex Accounts, introducing forex brokers, Currency Forex Data Feed and News
Currency Forex Trading Platform provided on-line by Dukascopy.com