Hello,
I have the following problem:
- Assume a dataset [3000,1]
- We construct a variable ‘signal’, which will have the same size of our dataset. ‘signal’ will be either 1 or -1, based on the evolution of our dataset.
- At the starting point (1, 1), ‘signal’ will have the value 1. We keep this value until the dataset moves x % below its highest value during the time that ‘signal’ was equal to 1. From that moment on, the variable ‘signal’ will have the value -1.
- We keep this value until the dataset moves x % above its lowest value during the time that signal was equal to -1. From that moment on, the variable ‘signal’ will have the value 1 again.
- And so on, and so on…
- A short example may make my problem more clear:
x = 10%
- dataset / signal
- 97 / 1
- 100 / 1
- 93 / 1
- 89 / -1 / dataset moves x % below its highest value (100) during the '1' signal
- 86 / -1
- 80 / -1
- 93 / 1 / dataset moves x % above its lowest value (80) during the '-1' signal
- 94 / 1
- 95 / 1
- 92 / 1
- 80 -1 / dataset moves x % below its highest value (95) during the '1' signal
- … …
Can anybody help me with this issue?
Thanks
Pieter
Best Answer