Hi there, I've successfully plotted the upper and lower boundaries that I have defined on the upper price chart as pictured.
As you can see in the below code, the input values have been set so the upper boundary is plotting at the price level of 369 and the
lower at 366, as red and green dotted lines.
Instead of defining the input values as a number, you can put a word such a High,Low,Open,Close, Vwap etc.. to have the line plotted on the price chart mimicking a moving average. When you define the input with those recognized words, you get a drop down list when you select 'edit properties' from the 'edit studies' menu containing other options, (H+L)/2, Tick Count, Volume, Open Interest etc etc..
My question is, is there a way to define the input value to have these boundaries plot above the high and low of current price + 1 standard deviation? or some other set value? Rather than have these defined boundaries stuck at a fixed price throughout the trading day, my goal would be to have these input values plot a line above current price to appear as a moving average containing all price action. Below is the code for these plots. Hope my explanation makes sense, thanks for any help. Cheers
-N
input UpperBoundary = 369;
plot Upperlevel= if hi>0 then UpperBoundary else Double.NaN;
upperlevel.SetPaintingStrategy(PaintingStrategy.linE);
upperlevel.AssignValueColor(if upperlevel then Color.green else Color.CURRENT);
upperlevel.setLineWeight(4);
input LowerBoundary = 366;
plot Lowerlevel = if lo<0 then LowerBoundary else double.NaN;
lowerlevel.SetPaintingStrategy(PaintingStrategy.line);
lowerlevel.AssignValueColor(if lowerlevel then Color.red else Color.current);
lowerlevel.setLineWeight(4);
@SleepyZ hey my friend.. Any idea on this one? Appreciate the help
As you can see in the below code, the input values have been set so the upper boundary is plotting at the price level of 369 and the
lower at 366, as red and green dotted lines.
Instead of defining the input values as a number, you can put a word such a High,Low,Open,Close, Vwap etc.. to have the line plotted on the price chart mimicking a moving average. When you define the input with those recognized words, you get a drop down list when you select 'edit properties' from the 'edit studies' menu containing other options, (H+L)/2, Tick Count, Volume, Open Interest etc etc..
My question is, is there a way to define the input value to have these boundaries plot above the high and low of current price + 1 standard deviation? or some other set value? Rather than have these defined boundaries stuck at a fixed price throughout the trading day, my goal would be to have these input values plot a line above current price to appear as a moving average containing all price action. Below is the code for these plots. Hope my explanation makes sense, thanks for any help. Cheers
-N
input UpperBoundary = 369;
plot Upperlevel= if hi>0 then UpperBoundary else Double.NaN;
upperlevel.SetPaintingStrategy(PaintingStrategy.linE);
upperlevel.AssignValueColor(if upperlevel then Color.green else Color.CURRENT);
upperlevel.setLineWeight(4);
input LowerBoundary = 366;
plot Lowerlevel = if lo<0 then LowerBoundary else double.NaN;
lowerlevel.SetPaintingStrategy(PaintingStrategy.line);
lowerlevel.AssignValueColor(if lowerlevel then Color.red else Color.current);
lowerlevel.setLineWeight(4);
@SleepyZ hey my friend.. Any idea on this one? Appreciate the help
Last edited by a moderator: