This may be a better visual cue for some people for the volume label.
The previous day's volume label will be light gray in color.
If today's volume is greater than the previous day's volume then the T-Vol label will be green.
If today's volume is less than the previous day's volume then the T-Vol label will be red.
In the event that the volume is = then the T-Vol label will be gray also. This would be a rare event but will happen and if no color is assigned for that condition then the T-Vol label would not display during that time.
Again, this is an identifier to help 'see' the volume per morning price action.
Enjoy:
# Begin Code
# Volume label by Palmer
# www.thepennystockquest.com
def yesterdayvol = volume(period = ”DAY”)[1];
def todayvol = volume(period = ”DAY”);
def volg = todayvol is greater than yesterdayvol;
def voll = todayvol is less than yesterdayvol;
AddLabel(yes, "Y_Vol: " + yesterdayvol, Color.light_gray);
AddLabel(yes, ("T_Vol: " + todayvol), if todayvol > yesterdayvol then Color.lime else if todayvol < yesterdayvol then color.red else color.light_gray);
# End Code
@Palmer I think you have just perfected the best thinkScript out there. I was already like "WOW!' this is going to save my hide big time and now I'm left in awe - and I still need to find the time to go through your other videos!
Thanks for the kind words everyone. I'll keep on keepin' on as things develope. If anyone wants to add any other 'days ago' labels to the code all you would need to do is add def yesterdayvol2 = volume(period = ”DAY”)[2]; under the line of code with the [1] in it and then add another AddLabel(yes, "Y_Vol: " + yesterdayvol2, Color.light_gray); under that original line but remember...I am using this to easily see the volume on the 1 minute chart per the opening area so adding 2 days ago and 3 da
days ago might not be that relevant...
And so goes coding...So if you are using this you see that it is not working. This is because I did not take into account the Friday to Monday weekend gap. The code looks for the volume from the previous day which was Sunday so there is no volume to compare. Stnad by later for the updated version of this...
Join now or log in to leave a comment