Giter VIP home page Giter VIP logo

Comments (4)

gelhaimer avatar gelhaimer commented on June 10, 2024

I think it's been already discussed within pr #1008.

What's been shared as a concern is the breaking aspect of such a change. The PR was then dropped because of that.

As you're the second one to bring that on the table, would it be interesting to consider this suggestion for the next major version ?

from ta4j.

TheCookieLab avatar TheCookieLab commented on June 10, 2024

Yes, whenever we make breaking changes we need to do a cost benefit analysis of sorts to determine if the improvement outweighs the cost. While updating references isn't a big deal, multiply it by 1000 users and in aggregate it becomes a not insignificant cost.

That said we should not let breaking changes become an anchor on progress and dismiss changes out of hand. What kind of structure/organization are you proposing?

from ta4j.

sgflt avatar sgflt commented on June 10, 2024

"multiply it by 1000 users and in aggregate it becomes a not insignificant cost"

But cost per user is still insignificant. I would not block evolution in 0.** beta phase, where whole concept/architecture of library is still being profiled. And on other side cost of usage unfriendly API may be far more significant than breaking changes that improves usability.

As a newcomer I have strugled with UX and flow of creating real trading bot. It is easy to misconfigure indicators and use differentBar series than intended.

   new Indicator(barseries1) instead of  new Indicator(barseries2)

I'd like to hide as much implementation details as possible, so implementor of trading bot or backtesting does not need to know how all things wire together to work correctly.

The possible way that I'd like is to enforce usage of builders and hide public constructors from outer world usage:

interface BarSerie {
   IndicatorFactory indicatorFactory();
}


var barSerie  = BarSerie.buider()
  .duration(xxx)
  .name(xxx)
  ...
  .build()

// this facade hides serie reference transfer to indicator and eliminates space for mistakes
var indicatorFactory = barSerie.indicatorFactory()
var sma = indicatorFactory.sma(50);
var macd = indicatorFactory.macd(12, 26);

new Indicator(xxx) // compile error, use Factory please.

Another proposal of structure change is related to parsing helpers.
Why CsvBarSeriesParser is in example? :) It is useful easy implementation of backtests.
Why not create ta4j-csv module for CSV parsing? ta4j-json for json parsing?

It is easier to fetch data from yfinance and write csv in expected format than fetch data from yfinance to some own csv and then write own parser. Provision of basic parser would save me some time.

from ta4j.

sgflt avatar sgflt commented on June 10, 2024

TODO look closely at NumericIndicator, which I have found just now.

from ta4j.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.