Greetings all,
thank you in advance for any and all assistance with creating a custom ToS script that plots UpArrow below candle where the high is greater than high of previous candle and volume is greater than volume of previous candle/bar. below is the draft script but it doesn't work - please help to get the script to work.
input length = 10;
input paintBars = yes;
input averageType = AverageType.WILDERS;
input price = volume;
input percent = 2;
input Choice = {default greater, less};
def x = 100*(price / price[length]-1);
plot scan;
switch (Choice){
case greater:
scan = x >= percent;
case less:
scan = x <= -percent;
}
DefineGlobalColor("Positive", Color.UPTICK);
plot greenarrow = if high is greater than high from 1 bars ago and Choice is greater than Choice from 1 bars ago then plotLow else Double.NaN;
greenarrow.SetDefaultColor(color.green);
greenarrow.SetPaintingStrategy(PaintingStrategy.ARROW_UP);
greenarrow.SetLineWeight(2);
greenarrow.HideBubble() ;
greenarrow.HideTitle() ;
thank you in advance for any and all assistance with creating a custom ToS script that plots UpArrow below candle where the high is greater than high of previous candle and volume is greater than volume of previous candle/bar. below is the draft script but it doesn't work - please help to get the script to work.
input length = 10;
input paintBars = yes;
input averageType = AverageType.WILDERS;
input price = volume;
input percent = 2;
input Choice = {default greater, less};
def x = 100*(price / price[length]-1);
plot scan;
switch (Choice){
case greater:
scan = x >= percent;
case less:
scan = x <= -percent;
}
DefineGlobalColor("Positive", Color.UPTICK);
plot greenarrow = if high is greater than high from 1 bars ago and Choice is greater than Choice from 1 bars ago then plotLow else Double.NaN;
greenarrow.SetDefaultColor(color.green);
greenarrow.SetPaintingStrategy(PaintingStrategy.ARROW_UP);
greenarrow.SetLineWeight(2);
greenarrow.HideBubble() ;
greenarrow.HideTitle() ;