Calculations based on Variable time intervals

Hi,

I want to work on the column “W” below.

I need to determine all the time intervals (start and an end timestamp) if either of the two conditions below is met:

  1. “M1” above 0.03.
  2. “M2” above 0.2.

once all time intervals have been determined, the start time should be decreased by 5 min’s and the corresponding W value is taken, and the end time should be increased by 5 min’s and the corresponding W value also taken. then all the differences between the end and start W values are calculated for all intervals determined.

doing these calculations will save me a lot of time since I do it visually on a chart to first determine the targeted intervals before I calculate W differences.

Thanks for all your help.

Sam

Timestamp

M1

M2

W

06-10-18 6:01

0.02

0.2

2507

06-10-18 6:02

0.02

0.2

2514

06-10-18 6:03

0.02

0.2

2521

06-10-18 6:04

0.02

0.2

2528

06-10-18 6:05

0.02

0.2

2535

06-10-18 6:06

5.58

0.2

2542

06-10-18 6:07

5.35

0.2

2549

06-10-18 6:08

5.02

9.26

2556

06-10-18 6:09

5.92

11.23

2563

06-10-18 6:10

5.47

11.15

2569

06-10-18 6:11

5.52

11.66

2576

06-10-18 6:12

5.44

10.01

2583

06-10-18 6:13

5.57

11.35

2590

06-10-18 6:14

5.89

8.12

2597

06-10-18 6:15

5.13

11.55

2604

06-10-18 6:16

5.19

9.71

2611

06-10-18 6:17

0.03

10.98

2618

06-10-18 6:18

0.03

10.58

2625

06-10-18 6:19

0.02

11.50

2632

06-10-18 6:20

0.02

9.69

2639

06-10-18 6:21

3.00

9.92

2646

06-10-18 6:22

3.22

9.70

2653

06-10-18 6:23

3.71

8.27

2660

06-10-18 6:24

3.89

10.94

2667

06-10-18 6:25

4.68

9.59

2674

06-10-18 6:26

4.42

10.26

2681

06-10-18 6:27

3.43

10.59

2688

06-10-18 6:28

4.99

9.84

2694

06-10-18 6:29

3.91

9.62

2701

06-10-18 6:30

3.33

10.49

2708

06-10-18 6:31

4.51

11.38

2715

06-10-18 6:32

3.58

11.72

2722

06-10-18 6:33

0.02

11.26

2729

06-10-18 6:34

0.02

8.17

2736

06-10-18 6:35

0.02

9.25

2743

06-10-18 6:36

0.02

9.37

2750

06-10-18 6:37

0.02

0.20

2757

06-10-18 6:38

0.02

0.20

2764

06-10-18 6:39

0.02

0.20

2771

06-10-18 6:40

0.02

0.20

2778

06-10-18 6:41

0.02

0.20

2785

06-10-18 6:42

0.02

0.20

2792

06-10-18 6:43

0.02

0.20

2799

06-10-18 6:44

0.02

0.20

2806

06-10-18 6:45

0.02

0.20

2813

06-10-18 6:46

0.02

0.20

2819

06-10-18 6:47

0.02

0.20

2826

06-10-18 6:48

0.02

0.20

2833

06-10-18 6:49

0.02

0.20

2840

06-10-18 6:50

0.02

0.20

2847

06-10-18 6:51

0.02

0.20

2854

06-10-18 6:52

0.02

0.20

2861

06-10-18 6:53

4.54

0.20

2868

06-10-18 6:54

5.03

0.20

2875

06-10-18 6:55

5.45

0.20

2882

06-10-18 6:56

4.13

10.04

2889

06-10-18 6:57

4.40

10.00

2896

06-10-18 6:58

5.37

10.58

2903

06-10-18 6:59

5.91

11.28

2910

06-10-18 7:00

4.48

11.37

2917

06-10-18 7:01

5.77

11.13

2924

06-10-18 7:02

5.34

10.89

2931

06-10-18 7:03

5.92

10.08

2938

06-10-18 7:04

4.39

11.38

2944

06-10-18 7:05

5.07

11.07

2951

06-10-18 7:06

5.70

11.52

2958

06-10-18 7:07

5.99

11.65

2965

06-10-18 7:08

5.08

11.62

2972

06-10-18 7:09

5.51

11.27

2979

06-10-18 7:10

5.24

10.89

2986

06-10-18 7:11

5.47

11.57

2993

06-10-18 7:12

4.12

10.01

3000

06-10-18 7:13

0.03

10.98

3007

06-10-18 7:14

0.02

11.13

3014

06-10-18 7:15

0.02

0.20

3021

06-10-18 7:16

0.02

0.20

3028

By: Sam Smith

Leave a Reply

Your email address will not be published. Required fields are marked *