Let me explain what I'm trying to do, what I've done, and then ask my question.
I'm trying to build an indicator for intraday use, mainly 15min chart, 5 min chart, etc. I'm looking at the forex market and i want to plot horizontal lines that show the high/low of the asian session, london's session and new york's session. I created a tradinghours/session template which correspond to the close of the various sessions and I can plot the high/low lines with no problem. The issue is that the high/low lines of the previous session are either too long or too short for the next session. I want to see the high/low of the asian session plotted as an overlay on the london session.
I've got a decent programming background (mainly c++) so here's basically what my script does. I set up a few properties defining time in integers. For example, an int value for hours and an int value for minutes and then convert them into a datetime variable (mainly just a simplified way to easily adjust). I do this for the start time and the end time of the session i want to find the high/low from. After defining these time markers, I find the number of bars back from the current bar where the start time is and the same for the end time. This gives me an array of 'bars' to find the MIN() and MAX() from and then apply these values to the Plot(line)'s value property (Series<double>).
I suspect the problem is because of something like the number of elements in the 'plot' or line object is the same (probably by default) as in the array used to determine the MIN/MAX. How can I change the number of elements in the plot or line object displayed on the chart? Can I even do that or do i need to create a new array or a new Plot which corresponds to the number of bars of the london session? Also, wondering if there was an easier way to do this using the 'tradinghours.session' template I already made. All the start/end times are already there, might be a bit cleaner to use that.
I looked up the class/object models available but unfortunately I didn't find enough detail there to figure it out.
Thanks,
Brennan

Comment