|
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 to fetch last tick of Friday |
Terry
|
Post subject: How to fetch last tick of Friday |
Post rating: 0
|
Posted: Mon 18 Mar, 2013, 20:34
|
|
User rating: 0
Joined: Mon 02 Apr, 2012, 09:22 Posts: 12 Location: United Kingdom, London
|
To Dukascopy Support,
Kindly tell me how to fetch the last tick of Friday when the market re-opens on Sunday.
Regards,
Terry.
|
|
|
|
 |
jlongo
|
Post subject: Re: How to fetch last tick of Friday |
Post rating: 0
|
Posted: Mon 18 Mar, 2013, 21:16
|
|
User rating: 94
Joined: Mon 06 Feb, 2012, 12:22 Posts: 357 Location: Portugal, Castelo Branco
|
Hi Terry: You can do that with the examples provided on Dukascopy Wiki hereTrade well JL
|
|
|
|
 |
Terry
|
Post subject: Re: How to fetch last tick of Friday |
Post rating: 0
|
Posted: Tue 19 Mar, 2013, 05:32
|
|
User rating: 0
Joined: Mon 02 Apr, 2012, 09:22 Posts: 12 Location: United Kingdom, London
|
To Jlongo,
Sorry but I don't think this answers my query. The methods suggested by you only fetch the last tick, the last tick by shift and the last tick by adding date and time. I want to fetch the last tick of the previous week in the current week and I may have to fetch it at various times during the whole current week.
Please suggest a way to do that.
Regards,
Terry.
|
|
|
|
 |
jlongo
|
Post subject: Re: How to fetch last tick of Friday |
Post rating: 0
|
Posted: Tue 19 Mar, 2013, 06:06
|
|
User rating: 94
Joined: Mon 06 Feb, 2012, 12:22 Posts: 357 Location: Portugal, Castelo Branco
|
Hi Terry: if you try with something like: List<ITick> ticks = history.getTicks(Instrument.EURUSD, friday_close_time_minus_some_time_just_in_case, friday_close_plus_some_time_just_in_case); int last = ticks.size() - 1; for (x=last, x > 0, x--){ // find the last tick with volume }
With this way you can get the last tick on friday getting all available ticks near the pre-time-close and plus-time-close i think. Don't know if there exists a better way. Trade well JL
|
|
|
|
 |
API Support
|
Post subject: Re: How to fetch last tick of Friday |
Post rating: 0
|
Posted: Tue 19 Mar, 2013, 08:42
|
|
User rating: ∞
Joined: Fri 31 Aug, 2007, 09:17 Posts: 6139
|
|
|
|
 |
Terry
|
Post subject: Re: How to fetch last tick of Friday |
Post rating: 0
|
Posted: Tue 19 Mar, 2013, 12:27
|
|
User rating: 0
Joined: Mon 02 Apr, 2012, 09:22 Posts: 12 Location: United Kingdom, London
|
To Dukascopy Support,
I wish to fetch the last tick of Friday of previous week at any time during the current week. The link suggested by you only shows how to get past market offline times and check if the market is offline or not as per my understanding. Could you plz elaborate how these methods answer my query?
Regards,
Terry.
|
|
|
|
 |
API Support
|
Post subject: Re: How to fetch last tick of Friday |
Post rating: 0
|
Posted: Tue 19 Mar, 2013, 14:20
|
|
User rating: ∞
Joined: Fri 31 Aug, 2007, 09:17 Posts: 6139
|
From market hours you can get the session end time. Take that end time and fetch ticks over the minute before that end time. From those ticks take the last tick and that will be the last tick of that trading session. Should you encounter any problems implementing the logic, please support your further inquiries with your example strategy.
|
|
|
|
 |
|
Pages: [
1
]
|
|
|
|
|