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.

Computing order quantity
 Post subject: Computing order quantity Post rating: 0   New post Posted: Sun 26 Sep, 2010, 19:41 

User rating: 0
Joined: Wed 08 Sep, 2010, 13:36
Posts: 5
Hi,support

In my strategy, need calculate orders quantity for many times. Before the calculation every time, whether must clear orders?

source code:
public List<IOrder> orders;
......
orders.clear();
orders = engine.getOrders();
......

My questions:
1. Is the red section right?
2. Is the red section a must?

Thank you.


 
 Post subject: Re: Computing order quantity Post rating: 0   New post Posted: Mon 27 Sep, 2010, 08:13 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
Hi,
Quote:
Is the red section right?
No, in this case you don't need to clear list, because in a next step you are assigning to this reference a new list reference.
Quote:
Is the red section a must?
No.


 

Jump to:  

  © 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