Add vertical line for each float rotation in volume


Category:
0
0

Hi!

This would be a very interesting study! I saw that someone asked for it here but it wasn’t very clear what he meant.

So, the user should provide the float value for the stock, but later the script should calculate when a new float rotation of volume is completed and add a vertical line each time.

For example, stock ABC has 2 M float. SO, it would be interesting to add a vertical line every time the volume adds 2 M shares more traded.

How would you do that, Pete, including the volume since premarket and during the whole session?

 

I tried this but I get very weird lines:

plot Data = close; #******* User Inputs *******#
#—-User Input(s)
input HideLabel = Yes;#hint HideLabel: Will hide the label asking for user input.
input float = 1000000;#hint float: input the float for your ticker here
input ticker = “XXXX”;#hint ticker: Type the ticker in here. This is for Label and ticker verification purposes
input Show_Float = yes;#hint Show_Float: Will display the User inputed float for easy reference for the rest of the day.

#******* Volume and Float Rotation *******#
#—-Volume Calculations
def Daily_volume = Fundamental(FundamentalType.VOLUME);
def newDay1 = GetDay() <> GetDay()[1];
rec todays_volume = if newDay1 then Daily_volume else todays_volume[1] + Daily_volume;
def float_rotation = Round((todays_volume / float), 1);

AddVerticalLine(yes, (if Show_Float_Rotation == no or ticker != GetSymbol() then “” else “Float Rotation: ” + float_rotation + “X”), (if ticker != GetSymbol() then Color.RED else Color.YELLOW));
#——————————————————————————————————–
#End of Script

Thanks!

Marked as spam
Posted by (Questions: 6, Answers: 21)
Asked on February 18, 2020 2:26 pm
566 views
0
Private answer

There is no way to provide a completely accurate solution to this request. The data available at the intraday time frame does not include the full volume traded. Details are explained in the following post: https://www.hahn-tech.com/ans/how-to-calculate-volume-from-the-open/

Marked as spam
Posted by (Questions: 37, Answers: 4118)
Answered on February 18, 2020 5:25 pm
0
How disappointing, Pete! Thanks so much anyways.
( at February 19, 2020 9:11 am)