_SECTION_BEGIN("Market Breadth Oscillator"); IndexList = ParamList("Reference Index:","1: Off|2: $XAO.au ASX All Ords Short Term|3: $XAO.au ASX All Ords Med/Long Term|4: $XSO.au ASX Small Ords Short Term|5: $XSO.au ASX Small Ords Med/Long Term|6: $XFL.au ASX 50 Short Term|7: $XFL.au ASX 50 Med/Long Term|8: $XTO.au ASX 100 Short Term|9: $XTO.au ASX 100 Med/Long Term|10: $XJO.au ASX 200 Short Term|11: $XJO.au ASX 200 Med/Long Term|12: $XKO.au ASX 300 Short Term|13: $XKO.au ASX 300 Med/Long Term|14: $DJI Dow Jones Industrial Ave. Short Term|15: $DJI Dow Jones Industrial Ave. Med/Long Term|16: $OEX S&P 100 Short Term|17: $OEX S&P 100 Med/Long Term|18: $SPX S&P 500 Short Term|19: $SPX S&P 500 Med/Long Term|20: $SP1500 S&P 1500 Short Term|21: $SP1500 S&P 1500 Med/Long Term|22: $MID S&P 400 Mid Cap Short Term|23: $MID S&P 400 Mid Cap Med/Long Term|24: $SML S&P 600 Small Cap Short Term|25: $SML S&P 600 Small Cap Med/Long Term|26: $NDX NASDAQ 100 Short Term|27: $NDX NASDAQ 100 Med/Long Term|28: $RUI Russell 1000 Short Term|29: $RUI Russell 1000 Med/Long Term|30: $RUT Russell 2000 Short Term|31: $RUT Russell 2000 Med/Long Term|32: $RUA Russell 3000 Short Term|33: $RUA Russell 3000 Med/Long Term",25); IndexMA = 1; IndexADV = 1; IndexDEC = 1; IndexNH = 1; IndexNL = 1; IndexO = 1; IndexH = 1; IndexL = 1; IndexC = 1; IndexCount = 1; if(IndexList == "1: Off") (IndexMA = 1) AND (IndexADV = 1) AND (IndexDEC = 1) AND (IndexNH = 1) AND (IndexNL= 1) AND (IndexO = 1) AND (IndexH = 1) AND (IndexL = 1) AND (IndexC = 1) AND (IndexCount = 1) AND (_N(Title = StrFormat(""))); if(IndexList == "2: $XAO.au ASX All Ords Short Term") (IndexMA = Foreign("#XAO%MA20.au","C")) AND (IndexADV = Foreign("#XAOADV.au","C")) AND (IndexDEC = Foreign("#XAODEC.au","C")) AND (IndexNH = Foreign("#XAO4WHI.au","C")) AND (IndexNL = Foreign("#XAO4WLO.au","C")) AND (IndexO = Foreign("$XAO.au","O")) AND (IndexH = Foreign("$XAO.au","H")) AND (IndexL = Foreign("$XAO.au","L")) AND (IndexC = Foreign("$XAO.au","C")) AND (IndexCount = 500) AND (_N(Title = StrFormat("$XAO.au ASX All Ords Short Term - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) {{VALUES}}", IndexO, IndexH, IndexL, IndexC, SelectedValue( ROC( IndexC, 1 ) ) ))); if(IndexList == "3: $XAO.au ASX All Ords Med/Long Term") (IndexMA = Foreign("#XAO%MA200.au","C")) AND (IndexADV = Foreign("#XAOADV.au","C")) AND (IndexDEC = Foreign("#XAODEC.au","C")) AND (IndexNH = Foreign("#XAO52WHI.au","C")) AND (IndexNL = Foreign("#XAO52WLO.au","C")) AND (IndexO = Foreign("$XAO.au","O")) AND (IndexH = Foreign("$XAO.au","H")) AND (IndexL = Foreign("$XAO.au","L")) AND (IndexC = Foreign("$XAO.au","C")) AND (IndexCount = 500) AND (_N(Title = StrFormat("$XAO.au ASX All Ords Med/Long Term - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) {{VALUES}}", IndexO, IndexH, IndexL, IndexC, SelectedValue( ROC( IndexC, 1 ) ) ))); if(IndexList == "4: $XSO.au ASX Small Ords Short Term") (IndexMA = Foreign("#XSO%MA20.au","C")) AND (IndexADV = Foreign("#XSOADV.au","C")) AND (IndexDEC = Foreign("#XSODEC.au","C")) AND (IndexNH = Foreign("#XSO4WHI.au","C")) AND (IndexNL = Foreign("#XSO4WLO.au","C")) AND (IndexO = Foreign("$XSO.au","O")) AND (IndexH = Foreign("$XSO.au","H")) AND (IndexL = Foreign("$XSO.au","L")) AND (IndexC = Foreign("$XSO.au","C")) AND (IndexCount = 200) AND (_N(Title = StrFormat("$XSO.au ASX Small Ords Short Term - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) {{VALUES}}", IndexO, IndexH, IndexL, IndexC, SelectedValue( ROC( IndexC, 1 ) ) ))); if(IndexList == "5: $XSO.au ASX Small Ords Med/Long Term") (IndexMA = Foreign("#XSO%MA200.au","C")) AND (IndexADV = Foreign("#XSOADV.au","C")) AND (IndexDEC = Foreign("#XSODEC.au","C")) AND (IndexNH = Foreign("#XSO52WHI.au","C")) AND (IndexNL = Foreign("#XSO52WLO.au","C")) AND (IndexO = Foreign("$XSO.au","O")) AND (IndexH = Foreign("$XSO.au","H")) AND (IndexL = Foreign("$XSO.au","L")) AND (IndexC = Foreign("$XSO.au","C")) AND (IndexCount = 200) AND (_N(Title = StrFormat("$XSO.au ASX Small Ords Med/Long Term - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) {{VALUES}}", IndexO, IndexH, IndexL, IndexC, SelectedValue( ROC( IndexC, 1 ) ) ))); if(IndexList == "6: $XFL.au ASX 50 Short Term") (IndexMA = Foreign("#XFL%MA20.au","C")) AND (IndexADV = Foreign("#XFLADV.au","C")) AND (IndexDEC = Foreign("#XFLDEC.au","C")) AND (IndexNH = Foreign("#XFL4WHI.au","C")) AND (IndexNL = Foreign("#XFL4WLO.au","C")) AND (IndexO = Foreign("$XFL.au","O")) AND (IndexH = Foreign("$XFL.au","H")) AND (IndexL = Foreign("$XFL.au","L")) AND (IndexC = Foreign("$XFL.au","C")) AND (IndexCount = 50) AND (_N(Title = StrFormat("$XFL.au ASX 50 Short Term - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) {{VALUES}}", IndexO, IndexH, IndexL, IndexC, SelectedValue( ROC( IndexC, 1 ) ) ))); if(IndexList == "7: $XFL.au ASX 50 Med/Long Term") (IndexMA = Foreign("#XFL%MA200.au","C")) AND (IndexADV = Foreign("#XFLADV.au","C")) AND (IndexDEC = Foreign("#XFLDEC.au","C")) AND (IndexNH = Foreign("#XFL52WHI.au","C")) AND (IndexNL = Foreign("#XFL52WLO.au","C")) AND (IndexO = Foreign("$XFL.au","O")) AND (IndexH = Foreign("$XFL.au","H")) AND (IndexL = Foreign("$XFL.au","L")) AND (IndexC = Foreign("$XFL.au","C")) AND (IndexCount = 50) AND (_N(Title = StrFormat("$XFL.au ASX 50 Med/Long Term - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) {{VALUES}}", IndexO, IndexH, IndexL, IndexC, SelectedValue( ROC( IndexC, 1 ) ) ))); if(IndexList == "8: $XTO.au ASX 100 Short Term") (IndexMA = Foreign("#XTO%MA20.au","C")) AND (IndexADV = Foreign("#XTOADV.au","C")) AND (IndexDEC = Foreign("#XTODEC.au","C")) AND (IndexNH = Foreign("#XTO4WHI.au","C")) AND (IndexNL = Foreign("#XTO4WLO.au","C")) AND (IndexO = Foreign("$XTO.au","O")) AND (IndexH = Foreign("$XTO.au","H")) AND (IndexL = Foreign("$XTO.au","L")) AND (IndexC = Foreign("$XTO.au","C")) AND (IndexCount = 100) AND (_N(Title = StrFormat("$XTO.au ASX 100 Short Term - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) {{VALUES}}", IndexO, IndexH, IndexL, IndexC, SelectedValue( ROC( IndexC, 1 ) ) ))); if(IndexList == "9: $XTO.au ASX 100 Med/Long Term") (IndexMA = Foreign("#XTO%MA200.au","C")) AND (IndexADV = Foreign("#XTOADV.au","C")) AND (IndexDEC = Foreign("#XTODEC.au","C")) AND (IndexNH = Foreign("#XTO52WHI.au","C")) AND (IndexNL = Foreign("#XTO52WLO.au","C")) AND (IndexO = Foreign("$XTO.au","O")) AND (IndexH = Foreign("$XTO.au","H")) AND (IndexL = Foreign("$XTO.au","L")) AND (IndexC = Foreign("$XTO.au","C")) AND (IndexCount = 100) AND (_N(Title = StrFormat("$XTO.au ASX 100 Med/Long Term - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) {{VALUES}}", IndexO, IndexH, IndexL, IndexC, SelectedValue( ROC( IndexC, 1 ) ) ))); if(IndexList == "10: $XJO.au ASX 200 Short Term") (IndexMA = Foreign("#XJO%MA20.au","C")) AND (IndexADV = Foreign("#XJOADV.au","C")) AND (IndexDEC = Foreign("#XJODEC.au","C")) AND (IndexNH = Foreign("#XJO4WHI.au","C")) AND (IndexNL = Foreign("#XJO4WLO.au","C")) AND (IndexO = Foreign("$XJO.au","O")) AND (IndexH = Foreign("$XJO.au","H")) AND (IndexL = Foreign("$XJO.au","L")) AND (IndexC = Foreign("$XJO.au","C")) AND (IndexCount = 200) AND (_N(Title = StrFormat("$XJO.au ASX 200 Short Term - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) {{VALUES}}", IndexO, IndexH, IndexL, IndexC, SelectedValue( ROC( IndexC, 1 ) ) ))); if(IndexList == "11: $XJO.au ASX 200 Med/Long Term") (IndexMA = Foreign("#XJO%MA200.au","C")) AND (IndexADV = Foreign("#XJOADV.au","C")) AND (IndexDEC = Foreign("#XJODEC.au","C")) AND (IndexNH = Foreign("#XJO52WHI.au","C")) AND (IndexNL = Foreign("#XJO52WLO.au","C")) AND (IndexO = Foreign("$XJO.au","O")) AND (IndexH = Foreign("$XJO.au","H")) AND (IndexL = Foreign("$XJO.au","L")) AND (IndexC = Foreign("$XJO.au","C")) AND (IndexCount = 200) AND (_N(Title = StrFormat("$XJO.au ASX 200 Med/Long Term - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) {{VALUES}}", IndexO, IndexH, IndexL, IndexC, SelectedValue( ROC( IndexC, 1 ) ) ))); if(IndexList == "12: $XKO.au ASX 300 Short Term") (IndexMA = Foreign("#XKO%MA20.au","C")) AND (IndexADV = Foreign("#XKOADV.au","C")) AND (IndexDEC = Foreign("#XKODEC.au","C")) AND (IndexNH = Foreign("#XKO4WHI.au","C")) AND (IndexNL = Foreign("#XKO4WLO.au","C")) AND (IndexO = Foreign("$XKO.au","O")) AND (IndexH = Foreign("$XKO.au","H")) AND (IndexL = Foreign("$XKO.au","L")) AND (IndexC = Foreign("$XKO.au","C")) AND (IndexCount = 300) AND (_N(Title = StrFormat("$XKO.au ASX 300 Short Term - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) {{VALUES}}", IndexO, IndexH, IndexL, IndexC, SelectedValue( ROC( IndexC, 1 ) ) ))); if(IndexList == "13: $XKO.au ASX 300 Med/Long Term") (IndexMA = Foreign("#XKO%MA200.au","C")) AND (IndexADV = Foreign("#XKOADV.au","C")) AND (IndexDEC = Foreign("#XKODEC.au","C")) AND (IndexNH = Foreign("#XKO52WHI.au","C")) AND (IndexNL = Foreign("#XKO52WLO.au","C")) AND (IndexO = Foreign("$XKO.au","O")) AND (IndexH = Foreign("$XKO.au","H")) AND (IndexL = Foreign("$XKO.au","L")) AND (IndexC = Foreign("$XKO.au","C")) AND (IndexCount = 300) AND (_N(Title = StrFormat("$XKO.au ASX 300 Med/Long Term - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) {{VALUES}}", IndexO, IndexH, IndexL, IndexC, SelectedValue( ROC( IndexC, 1 ) ) ))); if(IndexList == "14: $DJI Dow Jones Industrial Ave. Short Term") (IndexMA = Foreign("#DJI%MA20","C")) AND (IndexADV = Foreign("#DJIADV","C")) AND (IndexDEC = Foreign("#DJIDEC","C")) AND (IndexNH = Foreign("#DJI4WHI","C")) AND (IndexNL = Foreign("#DJI4WLO","C")) AND (IndexO = Foreign("$DJI","O")) AND (IndexH = Foreign("$DJI","H")) AND (IndexL = Foreign("$DJI","L")) AND (IndexC = Foreign("$DJI","C")) AND (IndexCount = 30) AND (_N(Title = StrFormat("$DJI Dow Jones Industrial Ave. Short Term - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) {{VALUES}}", IndexO, IndexH, IndexL, IndexC, SelectedValue( ROC( IndexC, 1 ) ) ))); if(IndexList == "15: $DJI Dow Jones Industrial Ave. Med/Long Term") (IndexMA = Foreign("#DJI%MA200","C")) AND (IndexADV = Foreign("#DJIADV","C")) AND (IndexDEC = Foreign("#DJIDEC","C")) AND (IndexNH = Foreign("#DJI52WHI","C")) AND (IndexNL = Foreign("#DJI52WLO","C")) AND (IndexO = Foreign("$DJI","O")) AND (IndexH = Foreign("$DJI","H")) AND (IndexL = Foreign("$DJI","L")) AND (IndexC = Foreign("$DJI","C")) AND (IndexCount = 30) AND (_N(Title = StrFormat("$DJI Dow Jones Industrial Ave. Med/Long Term - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) {{VALUES}}", IndexO, IndexH, IndexL, IndexC, SelectedValue( ROC( IndexC, 1 ) ) ))); if(IndexList == "16: $OEX S&P 100 Short Term") (IndexMA = Foreign("#OEX%MA20","C")) AND (IndexADV = Foreign("#OEXADV","C")) AND (IndexDEC = Foreign("#OEXDEC","C")) AND (IndexNH = Foreign("#OEX4WHI","C")) AND (IndexNL = Foreign("#OEX4WLO","C")) AND (IndexO = Foreign("$OEX","O")) AND (IndexH = Foreign("$OEX","H")) AND (IndexL = Foreign("$OEX","L")) AND (IndexC = Foreign("$OEX","C")) AND (IndexCount = 100) AND (_N(Title = StrFormat("$OEX S&P 100 Short Term - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) {{VALUES}}", IndexO, IndexH, IndexL, IndexC, SelectedValue( ROC( IndexC, 1 ) ) ))); if(IndexList == "17: $OEX S&P 100 Med/Long Term") (IndexMA = Foreign("#OEX%MA200","C")) AND (IndexADV = Foreign("#OEXADV","C")) AND (IndexDEC = Foreign("#OEXDEC","C")) AND (IndexNH = Foreign("#OEX52WHI","C")) AND (IndexNL = Foreign("#OEX52WLO","C")) AND (IndexO = Foreign("$OEX","O")) AND (IndexH = Foreign("$OEX","H")) AND (IndexL = Foreign("$OEX","L")) AND (IndexC = Foreign("$OEX","C")) AND (IndexCount = 100) AND (_N(Title = StrFormat("$OEX S&P 100 Med/Long Term - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) {{VALUES}}", IndexO, IndexH, IndexL, IndexC, SelectedValue( ROC( IndexC, 1 ) ) ))); if(IndexList == "18: $SPX S&P 500 Short Term") (IndexMA = Foreign("#SPX%MA20","C")) AND (IndexADV = Foreign("#SPXADV","C")) AND (IndexDEC = Foreign("#SPXDEC","C")) AND (IndexNH = Foreign("#SPX4WHI","C")) AND (IndexNL = Foreign("#SPX4WLO","C")) AND (IndexO = Foreign("$SPX","O")) AND (IndexH = Foreign("$SPX","H")) AND (IndexL = Foreign("$SPX","L")) AND (IndexC = Foreign("$SPX","C")) AND (IndexCount = 500) AND (_N(Title = StrFormat("$SPX S&P 500 Short Term - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) {{VALUES}}", IndexO, IndexH, IndexL, IndexC, SelectedValue( ROC( IndexC, 1 ) ) ))); if(IndexList == "19: $SPX S&P 500 Med/Long Term") (IndexMA = Foreign("#SPX%MA200","C")) AND (IndexADV = Foreign("#SPXADV","C")) AND (IndexDEC = Foreign("#SPXDEC","C")) AND (IndexNH = Foreign("#SPX52WHI","C")) AND (IndexNL = Foreign("#SPX52WLO","C")) AND (IndexO = Foreign("$SPX","O")) AND (IndexH = Foreign("$SPX","H")) AND (IndexL = Foreign("$SPX","L")) AND (IndexC = Foreign("$SPX","C")) AND (IndexCount = 500) AND (_N(Title = StrFormat("$SPX S&P 500 Med/Long Term - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) {{VALUES}}", IndexO, IndexH, IndexL, IndexC, SelectedValue( ROC( IndexC, 1 ) ) ))); if(IndexList == "20: $SP1500 S&P 1500 Short Term") (IndexMA = Foreign("#SP1500%MA20","C")) AND (IndexADV = Foreign("#SP1500ADV","C")) AND (IndexDEC = Foreign("#SP1500DEC","C")) AND (IndexNH = Foreign("#SP15004WHI","C")) AND (IndexNL = Foreign("#SP15004WLO","C")) AND (IndexO = Foreign("$SP1500","O")) AND (IndexH = Foreign("$SP1500","H")) AND (IndexL = Foreign("$SP1500","L")) AND (IndexC = Foreign("$SP1500","C")) AND (IndexCount = 1500) AND (_N(Title = StrFormat("$SP1500 S&P 1500 Short Term - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) {{VALUES}}", IndexO, IndexH, IndexL, IndexC, SelectedValue( ROC( IndexC, 1 ) ) ))); if(IndexList == "21: $SP1500 S&P 1500 Med/Long Term") (IndexMA = Foreign("#SP1500%MA200","C")) AND (IndexADV = Foreign("#SP1500ADV","C")) AND (IndexDEC = Foreign("#SP1500DEC","C")) AND (IndexNH = Foreign("#SP150052WHI","C")) AND (IndexNL = Foreign("#SP150052WLO","C")) AND (IndexO = Foreign("$SP1500","O")) AND (IndexH = Foreign("$SP1500","H")) AND (IndexL = Foreign("$SP1500","L")) AND (IndexC = Foreign("$SP1500","C")) AND (IndexCount = 1500) AND (_N(Title = StrFormat("$SP1500 S&P 1500 Med/Long Term - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) {{VALUES}}", IndexO, IndexH, IndexL, IndexC, SelectedValue( ROC( IndexC, 1 ) ) ))); if(IndexList == "22: $MID S&P 400 Mid Cap Short Term") (IndexMA = Foreign("#MID%MA20","C")) AND (IndexADV = Foreign("#MIDADV","C")) AND (IndexDEC = Foreign("#MIDDEC","C")) AND (IndexNH = Foreign("#MID4WHI","C")) AND (IndexNL = Foreign("#MID4WLO","C")) AND (IndexO = Foreign("$MID","O")) AND (IndexH = Foreign("$MID","H")) AND (IndexL = Foreign("$MID","L")) AND (IndexC = Foreign("$MID","C")) AND (IndexCount = 400) AND (_N(Title = StrFormat("$MID S&P 400 Mid Cap Short Term - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) {{VALUES}}", IndexO, IndexH, IndexL, IndexC, SelectedValue( ROC( IndexC, 1 ) ) ))); if(IndexList == "23: $MID S&P 400 Mid Cap Med/Long Term") (IndexMA = Foreign("#MID%MA200","C")) AND (IndexADV = Foreign("#MIDADV","C")) AND (IndexDEC = Foreign("#MIDDEC","C")) AND (IndexNH = Foreign("#MID52WHI","C")) AND (IndexNL = Foreign("#MID52WLO","C")) AND (IndexO = Foreign("$MID","O")) AND (IndexH = Foreign("$MID","H")) AND (IndexL = Foreign("$MID","L")) AND (IndexC = Foreign("$MID","C")) AND (IndexCount = 400) AND (_N(Title = StrFormat("$MID S&P 400 Mid Cap Med/Long Term - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) {{VALUES}}", IndexO, IndexH, IndexL, IndexC, SelectedValue( ROC( IndexC, 1 ) ) ))); if(IndexList == "24: $SML S&P 600 Small Cap Short Term") (IndexMA = Foreign("#SML%MA20","C")) AND (IndexADV = Foreign("#SMLADV","C")) AND (IndexDEC = Foreign("#SMLDEC","C")) AND (IndexNH = Foreign("#SML4WHI","C")) AND (IndexNL = Foreign("#SML4WLO","C")) AND (IndexO = Foreign("$SML","O")) AND (IndexH = Foreign("$SML","H")) AND (IndexL = Foreign("$SML","L")) AND (IndexC = Foreign("$SML","C")) AND (IndexCount = 600) AND (_N(Title = StrFormat("$SML S&P 600 Small Cap Short Term - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) {{VALUES}}", IndexO, IndexH, IndexL, IndexC, SelectedValue( ROC( IndexC, 1 ) ) ))); if(IndexList == "25: $SML S&P 600 Small Cap Med/Long Term") (IndexMA = Foreign("#SML%MA200","C")) AND (IndexADV = Foreign("#SMLADV","C")) AND (IndexDEC = Foreign("#SMLDEC","C")) AND (IndexNH = Foreign("#SML52WHI","C")) AND (IndexNL = Foreign("#SML52WLO","C")) AND (IndexO = Foreign("$SML","O")) AND (IndexH = Foreign("$SML","H")) AND (IndexL = Foreign("$SML","L")) AND (IndexC = Foreign("$SML","C")) AND (IndexCount = 600) AND (_N(Title = StrFormat("$SML S&P 600 Small Cap Med/Long Term - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) {{VALUES}}", IndexO, IndexH, IndexL, IndexC, SelectedValue( ROC( IndexC, 1 ) ) ))); if(IndexList == "26: $NDX NASDAQ 100 Short Term") (IndexMA = Foreign("#NDX%MA20","C")) AND (IndexADV = Foreign("#NDXADV","C")) AND (IndexDEC = Foreign("#NDXDEC","C")) AND (IndexNH = Foreign("#NDX4WHI","C")) AND (IndexNL = Foreign("#NDX4WLO","C")) AND (IndexO = Foreign("$NDX","O")) AND (IndexH = Foreign("$NDX","H")) AND (IndexL = Foreign("$NDX","L")) AND (IndexC = Foreign("$NDX","C")) AND (IndexCount = 100) AND (_N(Title = StrFormat("$NDX NASDAQ 100 Short Term - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) {{VALUES}}", IndexO, IndexH, IndexL, IndexC, SelectedValue( ROC( IndexC, 1 ) ) ))); if(IndexList == "27: $NDX NASDAQ 100 Med/Long Term") (IndexMA = Foreign("#NDX%MA200","C")) AND (IndexADV = Foreign("#NDXADV","C")) AND (IndexDEC = Foreign("#NDXDEC","C")) AND (IndexNH = Foreign("#NDX52WHI","C")) AND (IndexNL = Foreign("#NDX52WLO","C")) AND (IndexO = Foreign("$NDX","O")) AND (IndexH = Foreign("$NDX","H")) AND (IndexL = Foreign("$NDX","L")) AND (IndexC = Foreign("$NDX","C")) AND (IndexCount = 100) AND (_N(Title = StrFormat("$NDX NASDAQ 100 Med/Long Term - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) {{VALUES}}", IndexO, IndexH, IndexL, IndexC, SelectedValue( ROC( IndexC, 1 ) ) ))); if(IndexList == "28: $RUI Russell 1000 Short Term") (IndexMA = Foreign("#RUI%MA20","C")) AND (IndexADV = Foreign("#RUIADV","C")) AND (IndexDEC = Foreign("#RUIDEC","C")) AND (IndexNH = Foreign("#RUI4WHI","C")) AND (IndexNL = Foreign("#RUI4WLO","C")) AND (IndexO = Foreign("$RUI","O")) AND (IndexH = Foreign("$RUI","H")) AND (IndexL = Foreign("$RUI","L")) AND (IndexC = Foreign("$RUI","C")) AND (IndexCount = 1000) AND (_N(Title = StrFormat("$RUI Russell 1000 Short Term - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) {{VALUES}}", IndexO, IndexH, IndexL, IndexC, SelectedValue( ROC( IndexC, 1 ) ) ))); if(IndexList == "29: $RUI Russell 1000 Med/Long Term") (IndexMA = Foreign("#RUI%MA200","C")) AND (IndexADV = Foreign("#RUIADV","C")) AND (IndexDEC = Foreign("#RUIDEC","C")) AND (IndexNH = Foreign("#RUI52WHI","C")) AND (IndexNL = Foreign("#RUI52WLO","C")) AND (IndexO = Foreign("$RUI","O")) AND (IndexH = Foreign("$RUI","H")) AND (IndexL = Foreign("$RUI","L")) AND (IndexC = Foreign("$RUI","C")) AND (IndexCount = 1000) AND (_N(Title = StrFormat("$RUI Russell 1000 Med/Long Term - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) {{VALUES}}", IndexO, IndexH, IndexL, IndexC, SelectedValue( ROC( IndexC, 1 ) ) ))); if(IndexList == "30: $RUT Russell 2000 Short Term") (IndexMA = Foreign("#RUT%MA20","C")) AND (IndexADV = Foreign("#RUTADV","C")) AND (IndexDEC = Foreign("#RUTDEC","C")) AND (IndexNH = Foreign("#RUT4WHI","C")) AND (IndexNL = Foreign("#RUT4WLO","C")) AND (IndexO = Foreign("$RUT","O")) AND (IndexH = Foreign("$RUT","H")) AND (IndexL = Foreign("$RUT","L")) AND (IndexC = Foreign("$RUT","C")) AND (IndexCount = 2000) AND (_N(Title = StrFormat("$RUT Russell 2000 Short Term - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) {{VALUES}}", IndexO, IndexH, IndexL, IndexC, SelectedValue( ROC( IndexC, 1 ) ) ))); if(IndexList == "31: $RUT Russell 2000 Med/Long Term") (IndexMA = Foreign("#RUT%MA200","C")) AND (IndexADV = Foreign("#RUTADV","C")) AND (IndexDEC = Foreign("#RUTDEC","C")) AND (IndexNH = Foreign("#RUT52WHI","C")) AND (IndexNL = Foreign("#RUT52WLO","C")) AND (IndexO = Foreign("$RUT","O")) AND (IndexH = Foreign("$RUT","H")) AND (IndexL = Foreign("$RUT","L")) AND (IndexC = Foreign("$RUT","C")) AND (IndexCount = 2000) AND (_N(Title = StrFormat("$RUT Russell 2000 Med/Long Term - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) {{VALUES}}", IndexO, IndexH, IndexL, IndexC, SelectedValue( ROC( IndexC, 1 ) ) ))); if(IndexList == "32: $RUA Russell 3000 Short Term") (IndexMA = Foreign("#RUA%MA20","C")) AND (IndexADV = Foreign("#RUAADV","C")) AND (IndexDEC = Foreign("#RUADEC","C")) AND (IndexNH = Foreign("#RUA4WHI","C")) AND (IndexNL = Foreign("#RUA4WLO","C")) AND (IndexO = Foreign("$RUA","O")) AND (IndexH = Foreign("$RUA","H")) AND (IndexL = Foreign("$RUA","L")) AND (IndexC = Foreign("$RUA","C")) AND (IndexCount = 3000) AND (_N(Title = StrFormat("$RUA Russell 3000 Short Term - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) {{VALUES}}", IndexO, IndexH, IndexL, IndexC, SelectedValue( ROC( IndexC, 1 ) ) ))); if(IndexList == "33: $RUA Russell 3000 Med/Long Term") (IndexMA = Foreign("#RUA%MA200","C")) AND (IndexADV = Foreign("#RUAADV","C")) AND (IndexDEC = Foreign("#RUADEC","C")) AND (IndexNH = Foreign("#RUA52WHI","C")) AND (IndexNL = Foreign("#RUA52WLO","C")) AND (IndexO = Foreign("$RUA","O")) AND (IndexH = Foreign("$RUA","H")) AND (IndexL = Foreign("$RUA","L")) AND (IndexC = Foreign("$RUA","C")) AND (IndexCount = 3000) AND (_N(Title = StrFormat("$RUA Russell 3000 Med/Long Term - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) {{VALUES}}", IndexO, IndexH, IndexL, IndexC, SelectedValue( ROC( IndexC, 1 ) ) ))); McC = EMA((IndexADV-IndexDEC),19)-EMA((IndexADV-IndexDEC),39); McCPer = ((McC / ((HHV(McC,1000)-LLV(McC,1000))+1e-9) ) * 100) + 50; HLW = (IndexNH - IndexNL) / IndexCount; HLWPer = ((HLW / ((HHV(HLW,1000)-LLV(HLW,1000))+1e-9) ) * 100) + 50; BreadthOsc = (McCPer + HLWPer + IndexMA) / 3 ; GreenLim = Param("Green Limit",60,1,99,1); RedLim = Param("Red Limit",40,1,99,1); RibbonColour = IIf(BreadthOsc > GreenLim,colorGreen,IIf(BreadthOsc < RedLim,colorred,colorYellow)); Plot(1,"",RibbonColour,styleArea|styleOwnScale|styleNoLabel,-0.1,50); Plot(BreadthOsc,"Breadth Osc.",colorOrange); Plot(50,"",colorBlack); printf("Breadth Osc.: "+NumToStr(BreadthOsc,1.2) + "\n"); _SECTION_END();