|
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? |
RoadRunner
|
Post subject: ALL_FLATS - why are some flats not filtered? |
Post rating: 0
|
Posted: Sun 12 Dec, 2010, 08:13
|
|
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.
|
|
|
|
 |
RoadRunner
|
Post subject: Re: ALL_FLATS - why are some flats not filtered? |
Post rating: 0
|
Posted: Sun 12 Dec, 2010, 09:16
|
|
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.
|
|
|
|
 |
API Support
|
Post subject: Re: ALL_FLATS - why are some flats not filtered? |
Post rating: 0
|
Posted: Tue 14 Dec, 2010, 10:36
|
|
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.
|
|
|
|
 |
RoadRunner
|
Post subject: Re: ALL_FLATS - why are some flats not filtered? |
Post rating: 0
|
Posted: Tue 14 Dec, 2010, 20:14
|
|
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.
|
|
|
|
 |
API Support
|
Post subject: Re: ALL_FLATS - why are some flats not filtered? |
Post rating: 0
|
Posted: Thu 16 Dec, 2010, 14:01
|
|
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.
|
|
|
|
 |
|
Pages: [
1
]
|
|
|
|
|