declare lower;
def len1 = 7;
def timeframe = AggregationPeriod.day;
def GBP1 = (close("GBP/USD", period = timeframe) - Highest(high("GBP/USD", period = timeframe), len1)) / ((Highest(high("GBP/USD", period = timeframe), len1)) - Lowest(low("GBP/USD", period = timeframe), len1))*100;
def GBP2 = (close("GBP/JPY", period = timeframe) - Highest(high("GBP/JPY", period = timeframe), len1)) / ((Highest(high("GBP/JPY", period = timeframe), len1)) - Lowest(low("GBP/JPY", period = timeframe), len1))*100;
def GBP3 = (close("GBP/CAD", period = timeframe) - Highest(high("GBP/CAD", period = timeframe), len1)) / ((Highest(high("GBP/CAD", period = timeframe), len1)) - Lowest(low("GBP/CAD", period = timeframe), len1))*100;
def GBP4 = (close("GBP/AUD", period = timeframe) - Highest(high("GBP/AUD", period = timeframe), len1)) / ((Highest(high("GBP/AUD", period = timeframe), len1)) - Lowest(low("GBP/AUD", period = timeframe), len1))*100;
def GBP5 = -100 - ((Highest(high("EUR/GBP", period = timeframe), len1) - close("EUR/GBP", period = timeframe)) / (Lowest(low("EUR/GBP", period = timeframe), len1) - Highest(high("EUR/GBP", period = timeframe), len1))) * 100;
plot gbp_avg = (GBP1 + GBP2 + GBP3 + GBP4 + GBP5) / 5;
gbp_avg.AssignValueColor(color.Blue);
addlabel(yes, CONCAT("GBP", concat(" ", gbp_avg)), color.Blue);
def eur1 = (Highest(high("EUR/USD", period = timeframe)) - close("EUR/USD", period = timeframe)) / (Highest(high("EUR/USD", period = timeframe)) - Lowest(low("EUR/USD", period = timeframe), len1)) * (-100);
def EUR2 = (Highest(high("EUR/JPY", period = timeframe), len1) - close("EUR/JPY", period = timeframe)) / ((Highest(high("EUR/JPY", period = timeframe), len1)) - Lowest(low("EUR/JPY", period = timeframe), len1))*(-100);
def EUR3 = (Highest(high("EUR/CAD", period = timeframe), len1) - close("EUR/CAD", period = timeframe)) / ((Highest(high("EUR/CAD", period = timeframe), len1)) - Lowest(low("EUR/CAD", period = timeframe), len1))*(-100);
def EUR4 = (Highest(high("EUR/AUD", period = timeframe), len1) - close("EUR/AUD", period = timeframe)) / ((Highest(high("EUR/AUD", period = timeframe), len1)) - Lowest(low("EUR/AUD", period = timeframe), len1))*(-100);
def EUR5 = (Highest(high("EUR/GBP", period = timeframe), len1) - close("EUR/GBP", period = timeframe)) / ((Highest(high("EUR/GBP", period = timeframe), len1)) - Lowest(low("EUR/GBP", period = timeframe), len1)) * (-100);
plot eur_avg = (eur1 + eur2 + eur3 + eur4 + eur5) / 5;
eur_avg.AssignValueColor(color.green);
addlabel(yes, CONCAT("EUR", concat(" ", eur_avg)), color.green);
def usd1 = -100 + ((close("EUR/USD", period = timeframe) - Highest(high("EUR/USD", period = timeframe), len1)) / (Lowest(low("EUR/USD", period = timeframe), len1) - (Highest(high("EUR/USD", period = timeframe), len1)))*100);
def usd2 = (close("USD/JPY", period = timeframe) - Highest(high("USD/JPY", period = timeframe), len1)) / ((Highest(high("USD/JPY", period = timeframe), len1)) - Lowest(low("USD/JPY", period = timeframe), len1))*100;
def usd3 = (close("USD/CAD", period = timeframe) - Highest(high("USD/CAD", period = timeframe), len1)) / ((Highest(high("USD/CAD", period = timeframe), len1)) - Lowest(low("USD/CAD", period = timeframe), len1))*100;
def usd4 = -100 + (close("AUD/USD", period = timeframe) - Highest(high("AUD/USD", period = timeframe), len1)) / (Lowest(low("AUD/USD", period = timeframe), len1) - (Highest(high("AUD/USD", period = timeframe), len1)))*100;
def usd5 = -100 + (((close("GBP/USD", period = timeframe) -((Highest(high("GBP/USD", period = timeframe), len1)))) / (Lowest(low("GBP/USD", period = timeframe), len1) - (Highest(high("GBP/USD", period = timeframe), len1)))) * 100);
plot usd_avg = (usd1 + usd2 + usd3 + usd4 + usd5) / 5;
usd_avg.AssignValueColor(color.red);
addlabel(yes, CONCAT("USD", concat(" ", usd_avg)), color.red);
def aud1 = (close("AUD/USD", period = timeframe) - Highest(high("AUD/USD", period = timeframe), len1)) / ((Highest(high("AUD/USD", period = timeframe), len1)) - Lowest(low("AUD/USD", period = timeframe), len1))*100;
def aud2 = (close("AUD/JPY", period = timeframe) - Highest(high("AUD/JPY", period = timeframe), len1)) / ((Highest(high("AUD/JPY", period = timeframe), len1)) - Lowest(low("AUD/JPY", period = timeframe), len1))*100;
def aud3 = (close("AUD/CAD", period = timeframe) - Highest(high("AUD/CAD", period = timeframe), len1)) / ((Highest(high("AUD/CAD", period = timeframe), len1)) - Lowest(low("AUD/CAD", period = timeframe), len1))*100;
def aud4 = -100 + (((Highest(high("EUR/AUD", period = timeframe), len1))) - close("EUR/AUD", period = timeframe)) / (Lowest(low("EUR/AUD", period = timeframe), len1) - (Highest(high("EUR/AUD", period = timeframe), len1))) * (-100);
def aud5 =-100 + (((Highest(high("GBP/AUD", period = timeframe), len1))) - close("GBP/AUD", period = timeframe)) / (Lowest(low("GBP/AUD", period = timeframe), len1) - (Highest(high("GBP/AUD", period = timeframe), len1))) * (-100);
plot aud_avg = (aud1 + aud2 + aud3 + aud4 + aud5) / 5;
aud_avg.AssignValueColor(color.PLUM);
addlabel(yes, CONCAT("AUD", concat(" ", aud_avg)), color.plum);
def cad1 = -100 + (((Highest(high("GBP/CAD", period = timeframe), len1))) - close("GBP/CAD", period = timeframe)) / (Lowest(low("GBP/CAD", period = timeframe), len1) - (Highest(high("GBP/CAD", period = timeframe), len1))) * (-100);
def cad2 = (close("CAD/JPY", period = timeframe) - Highest(high("CAD/JPY", period = timeframe), len1)) / ((Highest(high("CAD/JPY", period = timeframe), len1)) - Lowest(low("CAD/JPY", period = timeframe), len1))*100;
def cad3 = -100 + (((Highest(high("AUD/CAD", period = timeframe), len1))) - close("AUD/CAD", period = timeframe)) / (Lowest(low("AUD/CAD", period = timeframe), len1) - (Highest(high("AUD/CAD", period = timeframe), len1))) * (-100);
def cad4 = -100 + (((Highest(high("EUR/CAD", period = timeframe), len1))) - close("EUR/CAD", period = timeframe)) / (Lowest(low("EUR/CAD", period = timeframe), len1) - (Highest(high("EUR/CAD", period = timeframe), len1))) * (-100);
def cad5 =-100 + (((Highest(high("USD/CAD", period = timeframe), len1))) - close("USD/CAD", period = timeframe)) / (Lowest(low("USD/CAD", period = timeframe), len1) - (Highest(high("USD/CAD", period = timeframe), len1))) * (-100);
plot cad_avg = (cad1 + cad2 + cad3 + cad4 + cad5) / 5;
cad_avg.AssignValueColor(color.daRK_ORANGE);
addlabel(yes, CONCAT("CAD", concat(" ", cad_avg)), color.darK_ORANGE);
def jpy1 = -100 + (((Highest(high("GBP/JPY", period = timeframe), len1))) - close("GBP/JPY", period = timeframe)) / (Lowest(low("GBP/JPY", period = timeframe), len1) - (Highest(high("GBP/JPY", period = timeframe), len1))) * (-100);
def jpy2 = -100 + (((Highest(high("USD/JPY", period = timeframe), len1))) - close("USD/JPY", period = timeframe)) / (Lowest(low("USD/JPY", period = timeframe), len1) - (Highest(high("USD/JPY", period = timeframe), len1))) * (-100);
def jpy3 = -100 + (((Highest(high("AUD/JPY", period = timeframe), len1))) - close("AUD/JPY", period = timeframe)) / (Lowest(low("AUD/JPY", period = timeframe), len1) - (Highest(high("AUD/JPY", period = timeframe), len1))) * (-100);
def jpy4 = -100 + (((Highest(high("EUR/JPY", period = timeframe), len1))) - close("EUR/JPY", period = timeframe)) / (Lowest(low("EUR/JPY", period = timeframe), len1) - (Highest(high("EUR/JPY", period = timeframe), len1))) * (-100);
def jpy5 = -100 + (((Highest(high("CAD/JPY", period = timeframe), len1))) - close("CAD/JPY", period = timeframe)) / (Lowest(low("CAD/JPY", period = timeframe), len1) - (Highest(high("CAD/JPY", period = timeframe), len1))) * (-100);
plot jpy_avg = (jpy1 + jpy2 + jpy3 + jpy4 + jpy5) / 5;
jpy_avg.AssignValueColor(color.YELLOW);
addlabel(yes, CONCAT("JPY", concat(" ", jpy_avg)), color.YELLOW);