JP782
New member
Is there a way to have the length I set increase by 1 every X mins(whatever the agg time is set to)?
example: I set length to 384 at 9:30am, at 9:35am the length will automatically increase to 385 and so on every five minutes(or whatever the agg period is being used)?
The "why" for this
Im running MTF standard deviation 5min on a 1min chart and I have to adjust the length (bar count**) every 5mins to display the devs correctly
example: I set length to 384 at 9:30am, at 9:35am the length will automatically increase to 385 and so on every five minutes(or whatever the agg period is being used)?
The "why" for this
Im running MTF standard deviation 5min on a 1min chart and I have to adjust the length (bar count**) every 5mins to display the devs correctly
Code:
def nan = Double.NaN;
input FiveMinLength = 101;
def FiveMinRegression = Inertia(close(period = aggregationPeriod.FIVE_MIN), FiveMinLength);
def FiveMinStdDev = stdev(close(period = aggregationPeriod.FIVE_MIN), FiveMinLength);
** this is script I have running on chart to know what length to use
def BN = BarNumber();
AddLabel(yes,BN, color.DARK_ORANGE);
Last edited by a moderator: