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.

any detailed explaination for Candlesbefore and CandlesAfter,goodTillTime params?
 Post subject: any detailed explaination for Candlesbefore and CandlesAfter,goodTillTime params? Post rating: 0   New post Posted: Wed 21 Nov, 2012, 05:55 
User avatar

User rating: 1
Joined: Sat 24 Sep, 2011, 12:11
Posts: 31
Location: China,
1.i have viewed the forum and wiki quikly ,but still feel confused about CandlesBefore and CandlesAfter parameters,so is there any concret explanation?maybe a pic to figure out the meanings of these two parameters with different values.

2.i have been using goodTillTime parameters in my strategy and according to this link https://www.dukascopy.com/wiki/#Place_Offer,it seems that i need to set this para as a relative time .but the problem is when i did backtesting,the time got from operating system is not the time of the bar created.so what should i do to modify the code i got from link above?

btw:not like explained in the link above, time to be plused is not in milliseconds,so does a 15 mins bar equals to 15*60*1000 or 15*60*1,000,000 ?


 
 Post subject: Re: any detailed explaination for Candlesbefore and CandlesAfter,goodTillTime params? Post rating: 0   New post Posted: Wed 21 Nov, 2012, 08:19 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
emacsen wrote:
1.i have viewed the forum and wiki quikly ,but still feel confused about CandlesBefore and CandlesAfter parameters,so is there any concret explanation?maybe a pic to figure out the meanings of these two parameters with different values.
See: https://www.dukascopy.com/client/javadoc/com/dukascopy/api/IHistory.html#getBars(com.dukascopy.api.Instrument,%20com.dukascopy.api.Period,%20com.dukascopy.api.OfferSide,%20com.dukascopy.api.Filter,%20int,%20long,%20int)
For visual example see:
https://www.dukascopy.com/wiki/#Indicator_Calculation/Calculate_indicator_by_candle_interval
emacsen wrote:
2.i have been using goodTillTime parameters in my strategy and according to this link https://www.dukascopy.com/wiki/#Place_Offer,it seems that i need to set this para as a relative time .but the problem is when i did backtesting,the time got from operating system is not the time of the bar created.so what should i do to modify the code i got from link above?
Please provide the example strategy and the launch scenario. Describe exactly which values you find to be wrong and what their values should be instead.
emacsen wrote:
btw:not like explained in the link above, time to be plused is not in milliseconds,so does a 15 mins bar equals to 15*60*1000 or 15*60*1,000,000 ?
1 second is 1000 milliseconds. For convenience consider using TimeUnit.convert.


 

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