- ago
Im not seeing an indicator that would give me the OHLC for a day (rather than for a bar or x bars ago).

Asking to know if it exists or if I would need to write code for it?

0
62
Solved
3 Replies

Reply

Bookmark

Sort
- ago
#1
What is the difference between a day and a bar?
In a backtest we talk about trading days, ignore weekends and so on.
So it makes not much sense to talk about calendar days...

2. What do you mean by OHLC indicator?
We have H-L for the trading range of a trading day and TR, called true range, which is a nice proxy of current volatility.


0
- ago
#2
Probably me communicating poorly.


bar = timeframe a strategy runs on. ie. 5m, 60m, day...

My question comes from if I have a strategy running on a 60m bar size, yet want to look at the High and/or low from yesterday, thats not one bar but a series of them.

All that said, about #2.. It may be my answer if its day bound and not intraday bound.

Let me know what to look at!
0
Cone8
 ( 5.94% )
- ago
#3
There are 2 ways to do it

1. Request the history for Daily bars and then Synchronize with the intraday chart.
See example for GetHistoryUnsynched. Note that Daily bars have the "settled close".

2. Or, Scale the intraday data to daily, then Synchronize back to the intraday chart.
See example for BarHistoryCompressor.ToDaily()

You can also use the ScaleInd indicator, but if you're coding and need more than 1 series, the other methods are better.
0
Best Answer

Reply

Bookmark

Sort