Hello,
I have this script that plots an arrow on the chart when extensions from moving averages and other simple criteria are met, the problem is that when the criteria is triggered the past arrows that were triggered on the chart just disappear, so I can not for sure see how accurate the indicator works unless I remember all the times it was triggered. Only shows the most recent trigger. Is this possible?
EXAMPLE:
https://gyazo.com/f993150fd50894945f64dd5f2196404c
SCRIPT:
I have this script that plots an arrow on the chart when extensions from moving averages and other simple criteria are met, the problem is that when the criteria is triggered the past arrows that were triggered on the chart just disappear, so I can not for sure see how accurate the indicator works unless I remember all the times it was triggered. Only shows the most recent trigger. Is this possible?
EXAMPLE:
https://gyazo.com/f993150fd50894945f64dd5f2196404c
SCRIPT:
Code:
input period_Type55 = AggregationPeriod.MIN;
input period_type27 = AggregationPeriod.DAY;
def begin = high(period = period_type27);
def end = high(period = period_Type55);
def NetChg = end - begin;
def PctChg = (end / begin) - 1;
input period_Type3 = AggregationPeriod.MIN;
plot DailyClose = close(period = PERIOD_TYPE27)[1];
def begin1 = close(period = period_Type3);
def end1 = high(period = period_Type3);
def NetChg1 = end1 - DailyClose;
def PctChg1 = (end1 / DailyClose) - 1;
input period_Type2 = AggregationPeriod.MIN;
input price2 = close;
input length2 = 72;
input displace2 = 0;
input showBreakoutSignals = no;
plot AvgExp2 = ExpAverage(price2[-displace2], length2);
plot DailyClose2 = close(period = ”DAY”)[1];
def begin2 = close(period = period_Type2);
def end2 = high(period = period_Type2);
def NetChg2 = end2 - AvgExp2;
def PctChg2 = (end2 / AvgExp2) - 1;
input period_Type4 = AggregationPeriod.MIN;
input price3 = close;
input length3 = 9;
input displace3 = 0;
input showBreakoutSignals3 = no;
plot AvgExp3 = ExpAverage(price3[-displace3], length3);
plot DailyClose3 = close(period = ”DAY”)[1];
def begin3 = close(period = period_Type4);
def end3 = high(period = period_Type4);
def NetChg3 = end3 - AvgExp3;
def PctChg3 = (end3 / AvgExp3) - 1;
plot ArrowUp = if (PctChg3 > 0.05 and PctChg2 > 0.13 and PctChg1 > 0.20 and PctChg > -0.15 )
then high
else Double.NaN;
ArrowUp.SetPaintingStrategy(PaintingStrategy.ARROW_UP);
ArrowUp.SetLineWeight(3);
ArrowUp.SetDefaultColor(Color.RED);
Alert(ArrowUP, " ", Alert.Bar, Sound.Bell);