Closed mouhamed-o closed 4 years ago
You need to code how to produce signals yourself in your own implementation of IndicatorStrategy.getSignal
.
I think you din't understand my need. When i talk about crossover function. I will give you an example : before last tick RSI value = 29 last tick RSI value = 32 My strategy will buy when the value crossOver up 30. this will generate one signal. If i use the comparator > , it will be always true if my RSI value is upper than 30 for example, the issue is i can get false signal like this. I don't know if you understand what i'm talking about.
crosserover will compare before last and last tick and the comparator > will use only the last tick value and if the value is upper, it will be always true
With the current indicator implementation, we can't get oldest values of the indicator.
You need to store the older values yourself if you want them. Nothing is kept in memory by the indicators unless it's required to perform a calculation. All the calculations done by the framework are done on the fly to optimize performance and memory usage.
You can probably use the CircularList
to help you. It will keep track a number n
of recent values.
Hi,
I'm very interest by what you made, and i'm looking for the way to check when a indicator crossover up or down an other indicator or a value.
Thanks