Volume Breakdown / Cumulative Delta Momentum Print indicator - text float problem
Alright so I have created a VB style print that plots in text the cumulative delta momentum (single bar value) on the bottom of the chart. However there is a slight problem, the float only works for bars created real time. other wise it just puts it some displacement from the bar. I want it to float all the time. But none the less this indicator works, its only the aesthetics that are messed up.
Basically you put cumulative delta as data 1/2/3, use data select input to set that. then it will plot at the bottom of your candle chart the delta of that bar.
If someone could tell me how to float historical text objects so they all line up that would be awesome
if i do last bar and float them with a last bar flag. then it wont display historical values but all of them will be lined up as only bars the platform was here for are printed.
this will probably take a little bit of programming.
When you use RecalcLastBarAfter, aiHighestDispValue and aiLowestDispValue that are used within the Text_Float function to return the highest and
lowest value for the currently displayed screen, will work on historical bars, too.
This alone doesn't help you of course, as you'd need to access all text IDs on the currently visible chart screen. This probably needs two steps, first store the barnumber for each bar
in a map (or array) using the datetime as map key and store each text ID within a map (or an array, but I'd suggest using a map and the ELCollections.DLL) and using the barnumber as the map key.
In a next step you'd have to get the datetime for the bar most left on the screen using aiLeftDispDateTime and the one on the right using aiRightDispDateTime. Use these two values to retrieve the barnumber
for the most left and most right bars and with these loop through the first map, retrieve each text ID and change the text location to the value of your choice.
Unfortunately I am not sure if there is something simpler, but the above should work. Although it might be too much work just for the aesthetics.
The following user says Thank You to ABCTG for this post:
Thanks for the indi. however I am having problems with the switch from historical to real time. You can see here that there is a gap of values. They appear on the real time candle but then gap until the historical time series.
Please register on futures.io to view futures trading content such as post attachment(s), image(s), and screenshot(s).
As i have IQFeed and the code works, it seems that one problem is that at CQG the charts are not fully synchronized. Your upper chart shows a timestamp of 14:04:06.050 and both on the bottom a timestamp
So barstatus (1) = 2 could be different to barstatus (3) = 2 .
Try to change the both lines with
if barstatus (dataselect ) = 2 then
if barstatus (1 ) = 2 then
The following user says Thank You to SPMC for this post: