1) The code comes out wrong here, some of the braces are not showing up. The forumla for the constant-volumebar formula has a small correction in the 'if (volumecount)' block - the date/time needs to be updated - its a new bar, so the new date/time is needed.
2) I am in the process of re-vamping much of the base design. Firstly, I discovered the necessity of manually double-buffering certain widgets when implementing crosshairs. This is for performance reasons - if you redraw everything that is math-intensive every time the crosshairs move, the performance is pitiful and the crosshairs lag. The solution is to turn off double buffering, and write the complex chart drawing routine to a QPixmap (controlled by an 'isDirty' flag) and when the crosshairs are moving around, the dirty flag is false so only the buffered pixmap is drawn. Needless to say the performance is stellar now (in that respect). I implemented remote crosshairs to charts that are not in focus, which was kind of fun. The performance of the remote crosshairs is not up-to-snuff yet. It shouldn't be necessary to search through all displayed bars to find the date/time corresponding to the date/time of the position of the crosshair on the in-focus chart. This little quest has motivated me to rethink how to revamp the whole thing. Firstly, I am establishing a abstract base chart widget class which will be inherited by all chart widget classes. This will provide commonality, clean up the code and allow for better expansion. In particular, I am trying to design a 'generic' way to draw various routines on any given chart panel widget - so one could for instance have any number of studies on any panel - behind the candle/bar area, for instance. Plus I have to come up with a way to handle such things as custom studies or possibly a plug-in format. Nothing too complex - but most important is to design it for simple future expansion. This will require a bit of planning - so I am taking my time on this so it is done right.
3) I thought this chart was somewhat interesting. It's really wide so the attachment hopefully will show up as a link instead of the picture being embedded within the body of this post.
Russell 2000 weekly, longer term
2) I am in the process of re-vamping much of the base design. Firstly, I discovered the necessity of manually double-buffering certain widgets when implementing crosshairs. This is for performance reasons - if you redraw everything that is math-intensive every time the crosshairs move, the performance is pitiful and the crosshairs lag. The solution is to turn off double buffering, and write the complex chart drawing routine to a QPixmap (controlled by an 'isDirty' flag) and when the crosshairs are moving around, the dirty flag is false so only the buffered pixmap is drawn. Needless to say the performance is stellar now (in that respect). I implemented remote crosshairs to charts that are not in focus, which was kind of fun. The performance of the remote crosshairs is not up-to-snuff yet. It shouldn't be necessary to search through all displayed bars to find the date/time corresponding to the date/time of the position of the crosshair on the in-focus chart. This little quest has motivated me to rethink how to revamp the whole thing. Firstly, I am establishing a abstract base chart widget class which will be inherited by all chart widget classes. This will provide commonality, clean up the code and allow for better expansion. In particular, I am trying to design a 'generic' way to draw various routines on any given chart panel widget - so one could for instance have any number of studies on any panel - behind the candle/bar area, for instance. Plus I have to come up with a way to handle such things as custom studies or possibly a plug-in format. Nothing too complex - but most important is to design it for simple future expansion. This will require a bit of planning - so I am taking my time on this so it is done right.
3) I thought this chart was somewhat interesting. It's really wide so the attachment hopefully will show up as a link instead of the picture being embedded within the body of this post.
Russell 2000 weekly, longer term
