Custom Start and End Times for Daily Candles?

If you need an Indicator or Signal developed or translated from other language, please post all Indicator development REQUESTS to this section here.

Moderator: admin

Custom Start and End Times for Daily Candles?

Postby frankdrebin » Wed Apr 10, 2019 2:03 am

Hello.

Is it possible to create candles that start and end at a custom time each day and only include data from that time period?

For example, a daily chart that shows an OHLC bar that opens at 08:31 EST and closes at 17:00 EST each day (rather than the normal 5pm to 5pm) would be very helpful to me as that is the time I trade, and would help to gauge previous volatility during that time period.

The chart would look somewhat like a normal chart except there would be gaps from Close to next Open on many bars.

Not being a programmer, I'm not sure whether this would be very easy or very difficult. Hoping for the former.

Apologies if this has already been asked and answered. I looked around the Board and couldn't find anything like this.

Any help offered would be greatly appreciated.

Thanks.
frankdrebin
 
Posts: 45
Joined: Fri Jan 18, 2013 3:10 pm

Re: Custom Start and End Times for Daily Candles?

Postby frankdrebin » Thu Apr 11, 2019 10:42 am

Also, at least for my purposes, the chart does NOT need to be live. This would be used strictly for analysis of past data.

Hope this helps.
frankdrebin
 
Posts: 45
Joined: Fri Jan 18, 2013 3:10 pm


Re: Custom Start and End Times for Daily Candles?

Postby frankdrebin » Fri Apr 12, 2019 3:09 am

This is close, a step in the right direction. Thanks.

However, I'd like to specify both a START and END time. Having only a start time still gives 24 hrs of data including the Asian and European sessions, which is data I don't need as I only trade the US hours.

Also, being able to specify both the start and end times by the hour and MINUTE is important.

Can this indicator be modified to do this?

Thanks again for your help.
frankdrebin
 
Posts: 45
Joined: Fri Jan 18, 2013 3:10 pm

Re: Custom Start and End Times for Daily Candles?

Postby Apprentice » Fri Apr 12, 2019 4:42 am

Your request is added to the development list under Id Number 4590
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 21629
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia


Re: Custom Start and End Times for Daily Candles?

Postby frankdrebin » Sun Apr 14, 2019 6:58 pm

This version looks like what I'm after, however, there's a problem.

After specifying the time range, the strategy only gives data for the start time for a duration based on the minute specified. Examples:

Period specified = 05:30 to 12:00. Results given for 02:30 to 03:00 = 1 - 30 min period (3 hrs earlier)
Period specified = 04:45 to 12:00. Results given for 01:45 to 02:00 = 1 - 15 min period (3 hrs earlier)
Period specified = 05:35 to 12:00. Results given for 02:35 to 02:40 = 1 - 5 min period (3 hrs earlier)
Period specified = 05:32 to 12:00. Results given for 02:32 to 02:33 = 1 - 1 min period ( 3 hrs earlier)

As you can see, the duration of the candle is based on the minute input of the beginning time specified.

The fact that there is a time offset is not that big a deal (I'm on the US West Coast - PST, UTC-8)

If this is fixable, that would make this indicator very valuable.

Thanks again for your help so far. Much appreciated.
frankdrebin
 
Posts: 45
Joined: Fri Jan 18, 2013 3:10 pm

Re: Custom Start and End Times for Daily Candles?

Postby Apprentice » Mon Apr 15, 2019 4:28 am

Your request is added to the development list under Id Number 4596
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 21629
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia


Re: Custom Start and End Times for Daily Candles?

Postby frankdrebin » Wed Apr 17, 2019 8:09 pm

This new version works, but with a catch:

The actual Start time of the candle is 3 hours before the inputted start time,
but the actual End time is 4 hours AFTER the inputted end time. Odd, but workable.

Example: input start time 05:31, end 12:00, results in Start time of 02:31, end 16:00

Again, strange, but not the end of the world. Otherwise, Indicator works as requested.

Mentioning it in case anyone else uses this indi and gets strange results. Just have to do a little math first.

If you want to fix this, that'd be great, but it is workable as is.

Thanks Again Apprentice!
frankdrebin
 
Posts: 45
Joined: Fri Jan 18, 2013 3:10 pm

Next

Return to Indicator and Signal Requests

Who is online

Users browsing this forum: No registered users and 7 guests