Musical Moving Averages - pinescript

//list of notes is at the end study(title="Musical Moving Averages", shorttitle="xMA", overlay=true) //len1 = input(15, minval=1, title="Length") //len2 = input(24, minval=1, title="Length") len3 = input(48, minval=1, title="Length") len4 = input(75, minval=1, title="Length") len5 = input(90, minval=1, title="Length") len6 = input(128, minval=1, title="Length") len7 = input(180, minval=1, title="Length") len8 = input(207, minval=1, title="Length") len9 = input(256, minval=1, title="Length") len10 = input(318, minval=1, title="Length") len11 = input(357, minval=1, title="Length") len12 = input(390, minval=1, title="Length") len13 = input(432, minval=1, title="Length") len14 = input(482, minval=1, title="Length") len15 = input(575, minval=1, title="Length") len16 = input(650, minval=1, title="Length") len17 = input(762, minval=1, title="Length") //len18 = input(1024, minval=1, title="Length") //len19 = input(2048, minval=1, title="Length") //len20 = input(763, minval=1, title="Length") len21 = input(1000, minval=1, title="Length") len22 = input(1500, minval=1, title="Length") src = input(close, title="Source") //ma1 = sma(src, len1) //ma2 = sma(src, len2) ma3 = sma(src, len3) ma4 = sma(src, len4) ma5 = sma(src, len5) ma6 = sma(src, len6) ma7 = sma(src, len7) ma8 = sma(src, len8) ma9 = sma(src, len9) ma10 = sma(src, len10) ma11 = sma(src, len11) ma12 = sma(src, len12) ma13 = sma(src, len13) ma14 = sma(src, len14) ma15 = sma(src, len15) ma16 = sma(src, len16) ma17 = sma(src, len17) //ma18 = sma(src, len18) //ma19 = sma(src, len19) //ma20 = sma(src, len20) ma21 = sma(src, len21) ma22 = sma(src, len22) //plot(ma1, color=#FF0000, title="MA1") //plot(ma2, color=#FF1100, title="MA2") plot(ma3, color=#FF2200, title="MA3") plot(ma4, color=#FF3300, title="MA4") plot(ma5, color=#FF4400, title="MA5") plot(ma6, color=#FF5500, title="MA6") plot(ma7, color=#FF6600, title="MA7") plot(ma8, color=#FF7700, title="MA8") plot(ma9, color=#EE8800, title="MA9") plot(ma10, color=#DD9900, title="MA10") plot(ma11, color=#CCAA00, title="MA11") plot(ma12, color=#BBBB00, title="MA12") plot(ma13, color=#AACC00, title="MA13") plot(ma14, color=#99DD00, title="MA14") plot(ma15, color=#88EE00, title="MA15") plot(ma16, color=#88EE00, title="MA16") plot(ma17, color=#88EE00, title="MA17") //plot(ma18, color=#88EE00, title="MA18") //plot(ma19, color=#88EE00, title="MA19") //plot(ma20, color=#88EE00, title="MA20") plot(ma21, color=#88EE00, title="MA21") plot(ma22, color=#88EE00, title="MA22") //15 B0 //24 G0 (B0 x1.6) //48 G1 (G0 x2) //75 D#2 (B0 x5) //90 F#2 (Bb0 x6) //128 C3 (2^7, G0 x6) //180 F#3 (B0 x12) //207 G# (C3 x1.618) /Fminor //230 A# //256 C4 (G0 x12) //285 D4 (B0 x19) //318 E4 (G0x13.25) //341 F4 //357 F#4 //375 G4 //432 A4 //450 Bb4 //482 B4 //575 D5 //650 E5 //762 G5 //1000 C6 //1500 G6

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.