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.

ALL_FLATS - why are some flats not filtered?
 Post subject: ALL_FLATS - why are some flats not filtered? Post rating: 0   New post Posted: Sun 12 Dec, 2010, 08:13 
User avatar

User rating: 3
Joined: Wed 18 May, 2011, 16:25
Posts: 331
Location: SwitzerlandSwitzerland
Hi,

using ALL_FLATS in history.getBars(..) still returns some flat bars on lower timeframes (like FIVE_MINS, ...).
When in a chart I drill down from a flat FIVE_MINS bar to ONE_MIN bars, the first flat minute bar is shown, the bars for the 2nd to 5th minute not.

On the DAILY clearly the first flat bar in a series of flats would not be shown.

So the question is:
What logic are you using to differentiate a flat that gets filtered from a flat that doesn't get filtered by the API?
Or are the flats that are still shown simply a bug?

Thanks a lot for a feedback.

Best, RR.


 
 Post subject: Re: ALL_FLATS - why are some flats not filtered? Post rating: 0   New post Posted: Sun 12 Dec, 2010, 09:16 
User avatar

User rating: 3
Joined: Wed 18 May, 2011, 16:25
Posts: 331
Location: SwitzerlandSwitzerland
hmmm, I've been proven wrong - there are DAILY bars showing up in filter ALL_FLATS from time to time...

example:
Sun 2007.03.25 shows up with OHLC=1.3282 in
history.getBars(EUR/USD, Daily, Bid, ALL_FLATS, 92, Thu 2007.06.28 00:00:00.000, 0);

This example is interesting as the Friday prior to this weekend (2007.03.23) was also a FLAT. So there have been 3 flat days in a row. In the chart however, Sun 2007.03.25 is NOT shown.

At least this example is definitely a bug. It also shows, that the charting is different to the data returned by the API.

Still the question remains, how you handle the flats-logic in smaller timeframes? There you can see flats in the charts as well as in the API returns. Are they bugs or a valid part of your ALL_FLATS logic?

Best, RR.


 
 Post subject: Re: ALL_FLATS - why are some flats not filtered? Post rating: 0   New post Posted: Tue 14 Dec, 2010, 10:36 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
If open prices are the same and open price is the same as the close price of the previous candle, then the candle is flat.


 
 Post subject: Re: ALL_FLATS - why are some flats not filtered? Post rating: 0   New post Posted: Tue 14 Dec, 2010, 20:14 
User avatar

User rating: 3
Joined: Wed 18 May, 2011, 16:25
Posts: 331
Location: SwitzerlandSwitzerland
In this case there are bugs in the current API versions as you can see from my descriptions.

Do you move this post to your open bug list or shall I open a new post in the bug section?

Best, RR.


 
 Post subject: Re: ALL_FLATS - why are some flats not filtered? Post rating: 0   New post Posted: Thu 16 Dec, 2010, 14:01 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
If candle close and open price matches, but candle open price does not matches with previous bar close price, it's not flat candle. You can see such candles in the the chart or you can get it using the getBars in the API.


 

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