SunSun wrote:
Does anyone else but me feel like this is a really incomplete API? And feel that the design needs a lot of improvement? To me, it feels like a C Programmer learned Java and tried to learn OOP, but the design isn't really there.
The idea was to make it simple to use not only for pro programers, but also for traders willing to write strategies and lear java in the process. "True" java designs with different programing patterns with OOP models etc are hard to understand and use for people whose usual job is not to program.
SunSun wrote:
Take indicators. There is one way to use an indicator in a strategy and a totally different way to use it in an indicator. It is like 2 people designed each part without talking to each other.
The difference in design arise from the different use. When strategy uses indicator it can request any data it wants by passing from-to, shift or number of candles and time. But indicators also used in different places like charts. In charts we dont need to pass from-to times to the indicator, we already have the data in buffer and need to calculate indcator values for this data and do that instantly.