Okay if we get into specifics, I would like to plot only the prime numbers of the number of times my float rotation indicator rotates.
When I give an input to the float, sometimes the input is small enough to plot many float rotations throughout the intraday.
For example if I used the float input as 10million, today BRQS rotated 19 times.
This data produces too many points for me to look at and I wish to only plot the prime number of times the float rotates.
Code:
input Float = 10000000;
input showfnodes = yes;
input showlabel = no;
def today= getday()>=getlastday();
def Todayv = volume(period="DAY");
def V = if Todayv then volume(period = getaggregationPeriod()) else double.NaN;
def DVol = if today then DVol[1] + V else 0;
def nodes = (DVol) % Float;
AddLabel (if showlabel and getAggregationPeriod()<=AggregationPeriod.hour then 1 else 0, "FloatRT: " + Round(Todayv/Float, 1), if Todayv < Float then Color.white else Color.orange);
AddVerticalLine(if getAggregationPeriod()<=AggregationPeriod.ten_MIN and showfnodes then nodes < nodes[1] else 0, Concat(Round(DVol / Float, 0),"") , Color.white, Curve.SHORT_DASH);
Before:
AFTER:
I need to edit the condition for AddVerticalLine where nodes < nodes[1] else 0, Concat(Round(DVol / Float, 0) is only plotting the prime numbers of rotation. Don't know how this can be done.
Actually come to think of it, how would you only addvertical lines of select numbers of the rotation ?