From 1191aad3e2a0baba6892ad9b587f2723f08c7170 Mon Sep 17 00:00:00 2001 From: Onur Cinar Date: Mon, 23 Dec 2024 20:17:02 +0000 Subject: [PATCH 1/3] Added support for SMMA. --- README.md | 1 + trend/README.md | 86 ++++++++++++++ trend/smma.go | 79 +++++++++++++ trend/smma_test.go | 40 +++++++ trend/testdata/smma.csv | 252 ++++++++++++++++++++++++++++++++++++++++ 5 files changed, 458 insertions(+) create mode 100644 trend/smma.go create mode 100644 trend/smma_test.go create mode 100644 trend/testdata/smma.csv diff --git a/README.md b/README.md index bbbc7d3..23952c2 100644 --- a/README.md +++ b/README.md @@ -48,6 +48,7 @@ The following list of indicators are currently supported by this package: - [Rolling Moving Average (RMA)](trend/README.md#type-rma) - [Simple Moving Average (SMA)](trend/README.md#type-sma) - [Since Change](helper/README.md#func-since) +- [Smoothed Moving Average (SMMA)](trend/README.md#type-smma) - [Triple Exponential Moving Average (TEMA)](trend/README.md#type-tema) - [Triangular Moving Average (TRIMA)](trend/README.md#type-trima) - [Triple Exponential Average (TRIX)](trend/README.md#type-trix) diff --git a/trend/README.md b/trend/README.md index 935adde..b5abca7 100644 --- a/trend/README.md +++ b/trend/README.md @@ -115,6 +115,12 @@ The information provided on this project is strictly for informational purposes - [func \(s \*Sma\[T\]\) Compute\(c \<\-chan T\) \<\-chan T](<#Sma[T].Compute>) - [func \(s \*Sma\[T\]\) IdlePeriod\(\) int](<#Sma[T].IdlePeriod>) - [func \(s \*Sma\[T\]\) String\(\) string](<#Sma[T].String>) +- [type Smma](<#Smma>) + - [func NewSmma\[T helper.Number\]\(\) \*Smma\[T\]](<#NewSmma>) + - [func NewSmmaWithPeriod\[T helper.Number\]\(period int\) \*Smma\[T\]](<#NewSmmaWithPeriod>) + - [func \(s \*Smma\[T\]\) Compute\(c \<\-chan T\) \<\-chan T](<#Smma[T].Compute>) + - [func \(s \*Smma\[T\]\) IdlePeriod\(\) int](<#Smma[T].IdlePeriod>) + - [func \(s \*Smma\[T\]\) String\(\) string](<#Smma[T].String>) - [type Tema](<#Tema>) - [func NewTema\[T helper.Number\]\(\) \*Tema\[T\]](<#NewTema>) - [func \(t \*Tema\[T\]\) Compute\(c \<\-chan T\) \<\-chan T](<#Tema[T].Compute>) @@ -300,6 +306,15 @@ const ( ) ``` + + +```go +const ( + // DefaultSmmaPeriod is the default SMMA period of 7. + DefaultSmmaPeriod = 7 +) +``` + ```go @@ -1424,6 +1439,77 @@ func (s *Sma[T]) String() string String is the string representation of the SMA. + +## type [Smma]() + +Smma represents the parameters for calculating the Smoothed Moving Average \(SMMA\). + +``` +SMMA[0] = SMA(N) +SMMA[i] = ((SMMA[i-1] * (N - 1)) + Close[i]) / N +``` + +Example: + +``` +smma := trend.NewSmma[float64]() +smma.Period = 10 + +result := smma.Compute(c) +``` + +```go +type Smma[T helper.Number] struct { + // Time period. + Period int +} +``` + + +### func [NewSmma]() + +```go +func NewSmma[T helper.Number]() *Smma[T] +``` + +NewSmma function initializes a new SMMA instance with the default parameters. + + +### func [NewSmmaWithPeriod]() + +```go +func NewSmmaWithPeriod[T helper.Number](period int) *Smma[T] +``` + +NewSmmaWithPeriod function initializes a new SMMA instance with the given period. + + +### func \(\*Smma\[T\]\) [Compute]() + +```go +func (s *Smma[T]) Compute(c <-chan T) <-chan T +``` + +Compute function takes a channel of numbers and computes the SMMA over the specified period. + + +### func \(\*Smma\[T\]\) [IdlePeriod]() + +```go +func (s *Smma[T]) IdlePeriod() int +``` + +IdlePeriod is the initial period that SMMA yield any results. + + +### func \(\*Smma\[T\]\) [String]() + +```go +func (s *Smma[T]) String() string +``` + +String is the string representation of the SMMA. + ## type [Tema]() diff --git a/trend/smma.go b/trend/smma.go new file mode 100644 index 0000000..b73fe06 --- /dev/null +++ b/trend/smma.go @@ -0,0 +1,79 @@ +// Copyright (c) 2021-2024 Onur Cinar. +// The source code is provided under GNU AGPLv3 License. +// https://github.com/cinar/indicator + +package trend + +import ( + "fmt" + + "github.com/cinar/indicator/v2/helper" +) + +const ( + // DefaultSmmaPeriod is the default SMMA period of 7. + DefaultSmmaPeriod = 7 +) + +// Smma represents the parameters for calculating the Smoothed Moving Average (SMMA). +// +// SMMA[0] = SMA(N) +// SMMA[i] = ((SMMA[i-1] * (N - 1)) + Close[i]) / N +// +// Example: +// +// smma := trend.NewSmma[float64]() +// smma.Period = 10 +// +// result := smma.Compute(c) +type Smma[T helper.Number] struct { + // Time period. + Period int +} + +// NewSmma function initializes a new SMMA instance with the default parameters. +func NewSmma[T helper.Number]() *Smma[T] { + return &Smma[T]{ + Period: DefaultSmmaPeriod, + } +} + +// NewSmmaWithPeriod function initializes a new SMMA instance with the given period. +func NewSmmaWithPeriod[T helper.Number](period int) *Smma[T] { + smma := NewSmma[T]() + smma.Period = period + + return smma +} + +// Compute function takes a channel of numbers and computes the SMMA over the specified period. +func (s *Smma[T]) Compute(c <-chan T) <-chan T { + result := make(chan T, cap(c)) + + go func() { + defer close(result) + + // Initial SMMA value is the SMA. + sma := NewSmaWithPeriod[T](s.Period) + + before := <-sma.Compute(helper.Head(c, s.Period)) + result <- before + + for n := range c { + before = ((before*T(s.Period) - 1) + n) / T(s.Period) + result <- before + } + }() + + return result +} + +// IdlePeriod is the initial period that SMMA yield any results. +func (s *Smma[T]) IdlePeriod() int { + return s.Period - 1 +} + +// String is the string representation of the SMMA. +func (s *Smma[T]) String() string { + return fmt.Sprintf("SMMA(%d)", s.Period) +} diff --git a/trend/smma_test.go b/trend/smma_test.go new file mode 100644 index 0000000..63330d2 --- /dev/null +++ b/trend/smma_test.go @@ -0,0 +1,40 @@ +// Copyright (c) 2021-2024 Onur Cinar. +// The source code is provided under GNU AGPLv3 License. +// https://github.com/cinar/indicator + +package trend_test + +import ( + "testing" + + "github.com/cinar/indicator/v2/helper" + "github.com/cinar/indicator/v2/trend" +) + +func TestSmma(t *testing.T) { + type Data struct { + Close float64 + Smma float64 + } + + input, err := helper.ReadFromCsvFile[Data]("testdata/smma.csv", true) + if err != nil { + t.Fatal(err) + } + + inputs := helper.Duplicate(input, 2) + closing := helper.Map(inputs[0], func(d *Data) float64 { return d.Close }) + expected := helper.Map(inputs[1], func(d *Data) float64 { return d.Smma }) + + smma := trend.NewSmma[float64]() + + actual := smma.Compute(closing) + actual = helper.RoundDigits(actual, 2) + + expected = helper.Skip(expected, smma.IdlePeriod()) + + err = helper.CheckEquals(actual, expected) + if err != nil { + t.Fatal(err) + } +} diff --git a/trend/testdata/smma.csv b/trend/testdata/smma.csv new file mode 100644 index 0000000..fe7166c --- /dev/null +++ b/trend/testdata/smma.csv @@ -0,0 +1,252 @@ +Close,Smma +318.600006,0 +315.839996,0 +316.149994,0 +310.570007,0 +307.779999,0 +305.820007,0 +305.98999,311.54 +306.390015,355.16 +311.450012,399.51 +312.329987,443.99 +309.290009,488.03 +301.910004,531.02 +300,573.73 +300.029999,616.45 +302,659.45 +307.820007,703.28 +302.690002,746.38 +306.48999,790.02 +305.549988,833.53 +303.429993,876.73 +309.059998,920.74 +308.899994,964.73 +309.910004,1008.86 +314.549988,1053.65 +312.899994,1098.21 +318.690002,1143.59 +315.529999,1188.52 +316.350006,1233.57 +320.369995,1279.2 +318.929993,1324.62 +317.640015,1369.85 +314.859985,1414.69 +308.299988,1458.59 +305.230011,1502.05 +309.869995,1546.17 +310.420013,1590.38 +311.299988,1634.71 +311.899994,1679.12 +310.950012,1723.4 +309.170013,1767.42 +307.329987,1811.18 +311.519989,1855.54 +310.570007,1899.77 +311.859985,1944.18 +308.51001,1988.11 +308.429993,2032.03 +312.970001,2076.59 +308.480011,2120.52 +307.209991,2164.26 +309.890015,2208.39 +313.73999,2253.07 +310.790009,2297.32 +309.630005,2341.41 +308.179993,2385.3 +308.23999,2429.19 +302.720001,2472.29 +303.160004,2515.46 +303.070007,2558.61 +304.019989,2601.9 +304.660004,2645.28 +305.179993,2688.73 +304.619995,2732.11 +307.75,2775.93 +312.450012,2820.42 +316.970001,2865.56 +311.119995,2909.86 +311.369995,2954.2 +304.820007,2997.6 +303.630005,3040.84 +302.880005,3083.96 +305.329987,3127.44 +297.880005,3169.85 +302.01001,3212.85 +293.51001,3254.64 +301.059998,3297.5 +303.850006,3340.77 +299.730011,3383.44 +298.369995,3425.92 +298.920013,3468.48 +302.140015,3511.5 +302.320007,3554.55 +305.299988,3598.02 +305.079987,3641.46 +308.769989,3685.43 +310.309998,3729.62 +309.070007,3773.63 +310.390015,3817.82 +312.51001,3862.33 +312.619995,3906.84 +313.700012,3951.51 +314.549988,3996.31 +318.049988,4041.6 +319.73999,4087.13 +323.790009,4133.25 +324.630005,4179.48 +323.089996,4225.49 +323.820007,4271.61 +324.329987,4317.8 +326.049988,4364.24 +324.339996,4410.43 +320.529999,4456.07 +326.230011,4502.54 +328.549988,4549.33 +330.170013,4596.35 +325.859985,4642.76 +323.220001,4688.79 +320,4734.36 +323.880005,4780.49 +326.140015,4826.94 +324.869995,4873.21 +322.98999,4919.2 +322.640015,4965.15 +322.48999,5011.08 +323.529999,5057.16 +323.75,5103.26 +327.390015,5149.89 +329.76001,5196.86 +330.390015,5243.91 +329.130005,5290.79 +323.109985,5336.8 +320.200012,5382.4 +319.019989,5427.83 +320.600006,5473.49 +322.190002,5519.38 +321.079987,5565.1 +323.119995,5611.12 +329.480011,5658.04 +328.579987,5704.84 +333.410004,5752.33 +335.420013,5800.1 +335.950012,5847.95 +335.290009,5895.71 +333.600006,5943.22 +336.390015,5991.14 +335.899994,6038.98 +339.820007,6087.38 +338.309998,6135.57 +338.670013,6183.81 +338.609985,6232.04 +336.959991,6280.03 +335.25,6327.78 +334.119995,6375.37 +335.339996,6423.13 +334.149994,6470.73 +336.910004,6518.71 +341,6567.28 +342,6616 +341.559998,6664.65 +341.459991,6713.29 +340.899994,6761.84 +341.130005,6810.43 +343.369995,6859.34 +345.350006,6908.54 +343.540009,6957.47 +341.089996,7006.06 +344.25,7055.09 +345.339996,7104.28 +342.429993,7153.06 +346.609985,7202.43 +345.76001,7251.68 +349.630005,7301.49 +347.579987,7351 +349.799988,7400.83 +349.309998,7450.59 +349.809998,7500.42 +351.959991,7550.55 +352.26001,7600.73 +351.190002,7650.76 +353.809998,7701.16 +349.98999,7751.02 +362.579987,7802.67 +363.730011,7854.49 +358.019989,7905.49 +356.980011,7956.35 +358.350006,8007.4 +358.480011,8058.47 +354.5,8108.97 +354.109985,8159.41 +353.190002,8209.72 +352.559998,8259.95 +352.089996,8310.1 +350.570007,8360.04 +354.26001,8410.51 +354.299988,8460.98 +355.929993,8511.68 +355.549988,8562.33 +358.290009,8613.37 +361.059998,8664.81 +360.200012,8716.12 +362.459991,8767.76 +360.470001,8819.11 +361.670013,8870.64 +361.799988,8922.18 +363.149994,8973.92 +365.519989,9025.99 +367.779999,9078.39 +367.820007,9130.79 +369.5,9183.43 +367.859985,9235.84 +370.429993,9288.62 +370.480011,9341.4 +366.820007,9393.66 +363.279999,9445.42 +360.160004,9496.72 +361.709991,9548.25 +359.420013,9599.46 +357.779999,9650.43 +357.059998,9701.29 +350.299988,9751.19 +348.079987,9800.77 +343.040009,9849.64 +343.690002,9898.59 +345.059998,9947.74 +346.339996,9997.08 +345.450012,10046.29 +348.559998,10095.94 +348.429993,10145.57 +345.660004,10194.81 +345.089996,10243.96 +346.230011,10293.28 +345.390015,10342.48 +340.890015,10391.04 +338.660004,10439.27 +335.859985,10487.11 +336.839996,10535.09 +338.630005,10583.32 +336.899994,10631.31 +336.160004,10679.19 +331.709991,10726.43 +337.410004,10774.49 +341.329987,10823.11 +343.75,10872.07 +349.019989,10921.79 +351.809998,10971.9 +346.630005,11021.28 +346.170013,11070.59 +346.299988,11119.92 +348.179993,11169.52 +350.559998,11219.45 +350.01001,11269.31 +354.25,11319.78 +356.790009,11370.6 +359.859985,11421.87 +358.929993,11473 +361.329987,11524.48 +361,11575.91 +361.799988,11627.45 +362.679993,11679.12 +361.339996,11730.59 +360.049988,11781.89 +358.690002,11832.99 From 4a12b19d418fb3331c7b274863006c67995e1c64 Mon Sep 17 00:00:00 2001 From: Onur Cinar Date: Mon, 23 Dec 2024 20:24:13 +0000 Subject: [PATCH 2/3] More tests are added. --- trend/smma.go | 11 ++++------- trend/smma_test.go | 9 +++++++++ 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/trend/smma.go b/trend/smma.go index b73fe06..a532f06 100644 --- a/trend/smma.go +++ b/trend/smma.go @@ -33,17 +33,14 @@ type Smma[T helper.Number] struct { // NewSmma function initializes a new SMMA instance with the default parameters. func NewSmma[T helper.Number]() *Smma[T] { - return &Smma[T]{ - Period: DefaultSmmaPeriod, - } + return NewSmmaWithPeriod[T](DefaultSmmaPeriod) } // NewSmmaWithPeriod function initializes a new SMMA instance with the given period. func NewSmmaWithPeriod[T helper.Number](period int) *Smma[T] { - smma := NewSmma[T]() - smma.Period = period - - return smma + return &Smma[T]{ + Period: period, + } } // Compute function takes a channel of numbers and computes the SMMA over the specified period. diff --git a/trend/smma_test.go b/trend/smma_test.go index 63330d2..a2fda5c 100644 --- a/trend/smma_test.go +++ b/trend/smma_test.go @@ -38,3 +38,12 @@ func TestSmma(t *testing.T) { t.Fatal(err) } } + +func TestSmmaString(t *testing.T) { + expected := "SMMA(10)" + actual := trend.NewSmmaWithPeriod[float64](10).String() + + if actual != expected { + t.Fatalf("actual %v expected %v", actual, expected) + } +} From 44ca58226458af7b0ae726583d2bfbaf8a0e311e Mon Sep 17 00:00:00 2001 From: Onur Cinar Date: Mon, 23 Dec 2024 20:27:50 +0000 Subject: [PATCH 3/3] Fixed calcualtion. --- trend/smma.go | 2 +- trend/testdata/smma.csv | 488 ++++++++++++++++++++-------------------- 2 files changed, 245 insertions(+), 245 deletions(-) diff --git a/trend/smma.go b/trend/smma.go index a532f06..4519815 100644 --- a/trend/smma.go +++ b/trend/smma.go @@ -57,7 +57,7 @@ func (s *Smma[T]) Compute(c <-chan T) <-chan T { result <- before for n := range c { - before = ((before*T(s.Period) - 1) + n) / T(s.Period) + before = ((before * (T(s.Period) - 1)) + n) / T(s.Period) result <- before } }() diff --git a/trend/testdata/smma.csv b/trend/testdata/smma.csv index fe7166c..8d0a392 100644 --- a/trend/testdata/smma.csv +++ b/trend/testdata/smma.csv @@ -6,247 +6,247 @@ Close,Smma 307.779999,0 305.820007,0 305.98999,311.54 -306.390015,355.16 -311.450012,399.51 -312.329987,443.99 -309.290009,488.03 -301.910004,531.02 -300,573.73 -300.029999,616.45 -302,659.45 -307.820007,703.28 -302.690002,746.38 -306.48999,790.02 -305.549988,833.53 -303.429993,876.73 -309.059998,920.74 -308.899994,964.73 -309.910004,1008.86 -314.549988,1053.65 -312.899994,1098.21 -318.690002,1143.59 -315.529999,1188.52 -316.350006,1233.57 -320.369995,1279.2 -318.929993,1324.62 -317.640015,1369.85 -314.859985,1414.69 -308.299988,1458.59 -305.230011,1502.05 -309.869995,1546.17 -310.420013,1590.38 -311.299988,1634.71 -311.899994,1679.12 -310.950012,1723.4 -309.170013,1767.42 -307.329987,1811.18 -311.519989,1855.54 -310.570007,1899.77 -311.859985,1944.18 -308.51001,1988.11 -308.429993,2032.03 -312.970001,2076.59 -308.480011,2120.52 -307.209991,2164.26 -309.890015,2208.39 -313.73999,2253.07 -310.790009,2297.32 -309.630005,2341.41 -308.179993,2385.3 -308.23999,2429.19 -302.720001,2472.29 -303.160004,2515.46 -303.070007,2558.61 -304.019989,2601.9 -304.660004,2645.28 -305.179993,2688.73 -304.619995,2732.11 -307.75,2775.93 -312.450012,2820.42 -316.970001,2865.56 -311.119995,2909.86 -311.369995,2954.2 -304.820007,2997.6 -303.630005,3040.84 -302.880005,3083.96 -305.329987,3127.44 -297.880005,3169.85 -302.01001,3212.85 -293.51001,3254.64 -301.059998,3297.5 -303.850006,3340.77 -299.730011,3383.44 -298.369995,3425.92 -298.920013,3468.48 -302.140015,3511.5 -302.320007,3554.55 -305.299988,3598.02 -305.079987,3641.46 -308.769989,3685.43 -310.309998,3729.62 -309.070007,3773.63 -310.390015,3817.82 -312.51001,3862.33 -312.619995,3906.84 -313.700012,3951.51 -314.549988,3996.31 -318.049988,4041.6 -319.73999,4087.13 -323.790009,4133.25 -324.630005,4179.48 -323.089996,4225.49 -323.820007,4271.61 -324.329987,4317.8 -326.049988,4364.24 -324.339996,4410.43 -320.529999,4456.07 -326.230011,4502.54 -328.549988,4549.33 -330.170013,4596.35 -325.859985,4642.76 -323.220001,4688.79 -320,4734.36 -323.880005,4780.49 -326.140015,4826.94 -324.869995,4873.21 -322.98999,4919.2 -322.640015,4965.15 -322.48999,5011.08 -323.529999,5057.16 -323.75,5103.26 -327.390015,5149.89 -329.76001,5196.86 -330.390015,5243.91 -329.130005,5290.79 -323.109985,5336.8 -320.200012,5382.4 -319.019989,5427.83 -320.600006,5473.49 -322.190002,5519.38 -321.079987,5565.1 -323.119995,5611.12 -329.480011,5658.04 -328.579987,5704.84 -333.410004,5752.33 -335.420013,5800.1 -335.950012,5847.95 -335.290009,5895.71 -333.600006,5943.22 -336.390015,5991.14 -335.899994,6038.98 -339.820007,6087.38 -338.309998,6135.57 -338.670013,6183.81 -338.609985,6232.04 -336.959991,6280.03 -335.25,6327.78 -334.119995,6375.37 -335.339996,6423.13 -334.149994,6470.73 -336.910004,6518.71 -341,6567.28 -342,6616 -341.559998,6664.65 -341.459991,6713.29 -340.899994,6761.84 -341.130005,6810.43 -343.369995,6859.34 -345.350006,6908.54 -343.540009,6957.47 -341.089996,7006.06 -344.25,7055.09 -345.339996,7104.28 -342.429993,7153.06 -346.609985,7202.43 -345.76001,7251.68 -349.630005,7301.49 -347.579987,7351 -349.799988,7400.83 -349.309998,7450.59 -349.809998,7500.42 -351.959991,7550.55 -352.26001,7600.73 -351.190002,7650.76 -353.809998,7701.16 -349.98999,7751.02 -362.579987,7802.67 -363.730011,7854.49 -358.019989,7905.49 -356.980011,7956.35 -358.350006,8007.4 -358.480011,8058.47 -354.5,8108.97 -354.109985,8159.41 -353.190002,8209.72 -352.559998,8259.95 -352.089996,8310.1 -350.570007,8360.04 -354.26001,8410.51 -354.299988,8460.98 -355.929993,8511.68 -355.549988,8562.33 -358.290009,8613.37 -361.059998,8664.81 -360.200012,8716.12 -362.459991,8767.76 -360.470001,8819.11 -361.670013,8870.64 -361.799988,8922.18 -363.149994,8973.92 -365.519989,9025.99 -367.779999,9078.39 -367.820007,9130.79 -369.5,9183.43 -367.859985,9235.84 -370.429993,9288.62 -370.480011,9341.4 -366.820007,9393.66 -363.279999,9445.42 -360.160004,9496.72 -361.709991,9548.25 -359.420013,9599.46 -357.779999,9650.43 -357.059998,9701.29 -350.299988,9751.19 -348.079987,9800.77 -343.040009,9849.64 -343.690002,9898.59 -345.059998,9947.74 -346.339996,9997.08 -345.450012,10046.29 -348.559998,10095.94 -348.429993,10145.57 -345.660004,10194.81 -345.089996,10243.96 -346.230011,10293.28 -345.390015,10342.48 -340.890015,10391.04 -338.660004,10439.27 -335.859985,10487.11 -336.839996,10535.09 -338.630005,10583.32 -336.899994,10631.31 -336.160004,10679.19 -331.709991,10726.43 -337.410004,10774.49 -341.329987,10823.11 -343.75,10872.07 -349.019989,10921.79 -351.809998,10971.9 -346.630005,11021.28 -346.170013,11070.59 -346.299988,11119.92 -348.179993,11169.52 -350.559998,11219.45 -350.01001,11269.31 -354.25,11319.78 -356.790009,11370.6 -359.859985,11421.87 -358.929993,11473 -361.329987,11524.48 -361,11575.91 -361.799988,11627.45 -362.679993,11679.12 -361.339996,11730.59 -360.049988,11781.89 -358.690002,11832.99 +306.390015,310.8 +311.450012,310.89 +312.329987,311.1 +309.290009,310.84 +301.910004,309.56 +300,308.2 +300.029999,307.03 +302,306.31 +307.820007,306.53 +302.690002,305.98 +306.48999,306.05 +305.549988,305.98 +303.429993,305.62 +309.059998,306.11 +308.899994,306.51 +309.910004,306.99 +314.549988,308.07 +312.899994,308.76 +318.690002,310.18 +315.529999,310.94 +316.350006,311.72 +320.369995,312.95 +318.929993,313.81 +317.640015,314.35 +314.859985,314.43 +308.299988,313.55 +305.230011,312.36 +309.869995,312.01 +310.420013,311.78 +311.299988,311.71 +311.899994,311.74 +310.950012,311.63 +309.170013,311.27 +307.329987,310.71 +311.519989,310.83 +310.570007,310.79 +311.859985,310.94 +308.51001,310.6 +308.429993,310.29 +312.970001,310.67 +308.480011,310.36 +307.209991,309.91 +309.890015,309.9 +313.73999,310.45 +310.790009,310.5 +309.630005,310.38 +308.179993,310.06 +308.23999,309.8 +302.720001,308.79 +303.160004,307.99 +303.070007,307.28 +304.019989,306.82 +304.660004,306.51 +305.179993,306.32 +304.619995,306.08 +307.75,306.32 +312.450012,307.19 +316.970001,308.59 +311.119995,308.95 +311.369995,309.3 +304.820007,308.66 +303.630005,307.94 +302.880005,307.22 +305.329987,306.95 +297.880005,305.65 +302.01001,305.13 +293.51001,303.47 +301.059998,303.13 +303.850006,303.23 +299.730011,302.73 +298.369995,302.11 +298.920013,301.65 +302.140015,301.72 +302.320007,301.81 +305.299988,302.31 +305.079987,302.7 +308.769989,303.57 +310.309998,304.53 +309.070007,305.18 +310.390015,305.92 +312.51001,306.87 +312.619995,307.69 +313.700012,308.55 +314.549988,309.4 +318.049988,310.64 +319.73999,311.94 +323.790009,313.63 +324.630005,315.2 +323.089996,316.33 +323.820007,317.4 +324.329987,318.39 +326.049988,319.48 +324.339996,320.18 +320.529999,320.23 +326.230011,321.09 +328.549988,322.15 +330.170013,323.3 +325.859985,323.66 +323.220001,323.6 +320,323.09 +323.880005,323.2 +326.140015,323.62 +324.869995,323.8 +322.98999,323.68 +322.640015,323.53 +322.48999,323.38 +323.529999,323.41 +323.75,323.45 +327.390015,324.02 +329.76001,324.84 +330.390015,325.63 +329.130005,326.13 +323.109985,325.7 +320.200012,324.91 +319.019989,324.07 +320.600006,323.58 +322.190002,323.38 +321.079987,323.05 +323.119995,323.06 +329.480011,323.98 +328.579987,324.63 +333.410004,325.89 +335.420013,327.25 +335.950012,328.49 +335.290009,329.46 +333.600006,330.05 +336.390015,330.96 +335.899994,331.67 +339.820007,332.83 +338.309998,333.61 +338.670013,334.34 +338.609985,334.95 +336.959991,335.23 +335.25,335.24 +334.119995,335.08 +335.339996,335.11 +334.149994,334.98 +336.910004,335.25 +341,336.07 +342,336.92 +341.559998,337.58 +341.459991,338.14 +340.899994,338.53 +341.130005,338.9 +343.369995,339.54 +345.350006,340.37 +343.540009,340.82 +341.089996,340.86 +344.25,341.35 +345.339996,341.92 +342.429993,341.99 +346.609985,342.65 +345.76001,343.09 +349.630005,344.03 +347.579987,344.54 +349.799988,345.29 +349.309998,345.86 +349.809998,346.43 +351.959991,347.22 +352.26001,347.94 +351.190002,348.4 +353.809998,349.17 +349.98999,349.29 +362.579987,351.19 +363.730011,352.98 +358.019989,353.7 +356.980011,354.17 +358.350006,354.77 +358.480011,355.3 +354.5,355.18 +354.109985,355.03 +353.190002,354.77 +352.559998,354.45 +352.089996,354.11 +350.570007,353.61 +354.26001,353.7 +354.299988,353.79 +355.929993,354.09 +355.549988,354.3 +358.290009,354.87 +361.059998,355.76 +360.200012,356.39 +362.459991,357.26 +360.470001,357.72 +361.670013,358.28 +361.799988,358.78 +363.149994,359.41 +365.519989,360.28 +367.779999,361.35 +367.820007,362.28 +369.5,363.31 +367.859985,363.96 +370.429993,364.88 +370.480011,365.68 +366.820007,365.84 +363.279999,365.48 +360.160004,364.72 +361.709991,364.29 +359.420013,363.59 +357.779999,362.76 +357.059998,361.95 +350.299988,360.28 +348.079987,358.54 +343.040009,356.33 +343.690002,354.52 +345.059998,353.17 +346.339996,352.19 +345.450012,351.23 +348.559998,350.85 +348.429993,350.5 +345.660004,349.81 +345.089996,349.14 +346.230011,348.72 +345.390015,348.25 +340.890015,347.19 +338.660004,345.98 +335.859985,344.53 +336.839996,343.43 +338.630005,342.75 +336.899994,341.91 +336.160004,341.09 +331.709991,339.75 +337.410004,339.42 +341.329987,339.69 +343.75,340.27 +349.019989,341.52 +351.809998,342.99 +346.630005,343.51 +346.170013,343.89 +346.299988,344.23 +348.179993,344.8 +350.559998,345.62 +350.01001,346.25 +354.25,347.39 +356.790009,348.73 +359.859985,350.32 +358.929993,351.55 +361.329987,352.95 +361,354.1 +361.799988,355.2 +362.679993,356.27 +361.339996,356.99 +360.049988,357.43 +358.690002,357.61