user configurable candlesticks

#1
Hi everyone,

does anyone know how it would be possible to write an AFL code that makes the opening time of candles/bars configurable to any point of time, adjustable by the user at any time?

I would find it interesting to experiment with this on small intraday timeframes.
I know it is easy to configure custom intraday intervals with AB, but I have not been able to find a way to make the opening time customizable.

Would appreciate any ideas.

Thanks in advance
p.
 

trash

Well-Known Member
#2
What candles opening times are you talking about? Where do you wanna start e.g. 1-minute candle? Do you wanna start it e.g. at 13:01:15 then 13:02:15 and so on? Time shift function only allows integer shift. The only way would be via import and using $TIMESHIFT 0.01666666667 in import format file which would shift by one minute. You could add a suggestion to feedback center of Amibroker to allow lower than 1 hour timeshift in data base settings.
 
#3
Thanks for the answer, trash.
Nice to see you here .:)

I would like to use it with 15sec databases, so shift the open to any quarter minute within an hour.
But already whole minutes would be fine.

I would prefer not to mess with the database, just some AFL code for the display of candles on charts.
Like setting the opening for the next 2-3 hours to say 8:3:30 and use it with 18 minutes, 20 min or whatever custom candle intervals.
 
Last edited:

trash

Well-Known Member
#4
I'm not absolutely sure but AFAIK it's not possible. Maybe you should ask support. And as mentioned there is also the feedback center to make suggestions.