I'm trying to develop a simple script, using the StreamWriter. The main objective is to have the high/low of the day and the bar number that made it.
Example:
I am working with a 30min candlestick RTH chart.
For the very first candle, the price goes down. For the second bar, the price keeps going down but reverses, deploys the daily low and starts going long for the rest of the session. The daily low occurred in the second session's candle.
I would like to have the daily low and the bar number in which it occurred. Same thing in the opposite direction, so i would need, in a 30' candlestick with the last year's trading sessions loaded:
TRADING DAY(date) - DAILY HIGH - BAR NR(daily high) - DAILY LOW - BAR NR(daily low)
My main problem is that i cannot understand how to work with different bars (30min candlesticks in this case) within days. If i work over a daily chart, i have no problems exporting H/L of all the bars, but when i have to work within days and the bars in these trading days, things get way more complicated.
Any help will be appreciated.
Thank you in advance!
Regards,
Diego.
Edit: Also, i'm a new member of this forum. If this topic does not belong here or whatever, please let me know.

Comment