Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Akila Thiwanka
    @akjcodes
    @C451 oh sounds good 🎉 .. 👆 this is what I did so far after going through sample codes @arul67800
    Code's All Right ™
    @C451
    ## [0.8.0] - 2020-10-15
    
    - Timezones (initial support)
    - Extended shader props
    - Show/hide scalebars (via chart-config sizes)
    - Chart section resizing [Ext]
    - Linked charts [Ext]
    - Shift + drag => Measure
    - Various bug kills and memory leak demolitions
    - Scripts: onrange exec, node.js SE exec (opt)
    - Scripts: added support of 'tf', 'range'
    - Updated RangeTool
    - Datasets, very first try
    - 30% build size decrease
    Akila Thiwanka
    @akjcodes
    great 🤩 🎉
    Akila Thiwanka
    @akjcodes
    @C451 appreciate if you can let me know how to enable chart section resizing extension.
    Code's All Right ™
    @C451
    @akjcodes we have a new repo https://github.com/tvjsx/tvjs-xp
    https://github.com/tvjsx/tvjs-xp/blob/main/src/apps/App1.vue is the example you are looking for
    But it is still WIP , have some bugs
    Akila Thiwanka
    @akjcodes
    Thanks lot @C451
    Arul
    @arul67800
    @C451 Thanks a lot for this amazing piece of art..Im studying this for the past 1 week and wondering how much time you must have dedicated for this..
    @akjcodes Hey..this is what we need..can you tel me how you acchieved this :)
    Code's All Right ™
    @C451
    @arul67800 thanks bro! that's how I describe it for myself "an art project". Bc it's hard to justify 1400 hours that I spent on it otherwise
    Code's All Right ™
    @C451
    Quick study (done entirely in one overlay) : BTC: Day Of The Week Returns
    https://tvjs.io/play/?a=ypwpa1aj
    Today is the most bearish day, but we are holding good so far
    DW_RETURNS.png
    Akila Thiwanka
    @akjcodes

    @arul67800

    1) Timeframes, there's an example here https://github.com/tvjsx/trading-vue-js/blob/master/test/tests/Timeframes.vue
    In that example, data is getting from a json file. But in my app, I'm getting data from Binance API for testing.

    2) You can create indicators such as SMA, EMA, BB, Stoch... using custom overlays. You can find a collection of indicator overlays made by the TradingVueJs community here https://github.com/tvjsx/tvjs-overlays
    Then use Datacube add method to add an indicator to the chart. https://github.com/tvjsx/trading-vue-js/tree/master/docs/datacube#add-side-overlay

    Arul
    @arul67800
    hello everyone, i did my strategies and backtesting in python..how to vizualize the code in python here ..any idea
    in short i need a python backend and vue.js frontend
    @akjcodes Thank you sir, im trying this
    @C451 We are very grateful for this sir...This product would be a superhit soon
    Arul
    @arul67800
    @akjcodes can you elaborate how you connected the websockets api instead of data.json?
    Akila Thiwanka
    @akjcodes

    @arul67800 Not sure which stream you're planning to use, but you can get an idea from this demo https://github.com/tvjsx/trading-vue-js/blob/master/test/tests/DataHelper.vue

    Or you can try socket.io if you're building your own stream

    BTW I'm a product designer, I do web developing when I'm free. So, I'm not the best one to get advice 😊 So, maybe there are more options other than socket.io
    Code's All Right ™
    @C451
    @arul67800 yeah, for now the only way to connect js to py is to use some kind of -sockets (I use unix-, but it's easier to go with web- ). Basically you need to make python server with REST api and use it in vue.js
    Arul
    @arul67800
    i think flask-restful api will do the job
    but can you give some ideas to make it happen
    Arul
    @arul67800
    @C451 im working on it and will revert back to you..
    Akila Thiwanka
    @akjcodes
    @C451 hey 👋 Is there any way that I can get all the candlestick data inside an Overlay? or access to the Datacube object without saving it as a global variable (DC)
    Code's All Right ™
    @C451
    @akjcodes you could, but why? One way is to clone the data into a .settings filed
    Overlays were designed as shaders, so they see only a subset of the data.
    Akila Thiwanka
    @akjcodes
    I'm working on an indicator that highlight price gaps. To do this I need to get last x candles data. I'm not sure what's the best way to achieve this. @C451
    Code's All Right ™
    @C451
    @akjcodes so why did I spend 2-3 months on scripts & datasets? That's the exact reason. : ) Had no time to document them yet, but will do for sure.
    If you dig into tests #7, #16 you'll find the answers
    Akila Thiwanka
    @akjcodes
    @C451 Thanks, unfortunatly I've already go through it but didn't understand how it works 😔 I might need to wait till you're document.
    Arul
    @arul67800
    @C451 yes sir.. We need some more documentation..
    Code's All Right ™
    @C451
    @arul67800 Will try to make asap, but the priority now is to finish 99.9%
    Akila Thiwanka
    @akjcodes

    @C451 Sorry to trouble you. I've go through the script test demo then checked SMA function in script_std.js file. But what I understood is that function going through all the visible candles and get SUM of last x candle starting from each visible candle. Is there any way to get only last x candles data?

    Hope my question is understandable 😊 For the time being I'm getting candles data using DC.get_one('chart'), inside the draw function on my custom overlay. But I'm not sure this is the optimized way to do it.

    Thanks

    Akila Thiwanka
    @akjcodes

    alt

    Basically, this is what I'm trying to achieve. I need to highlight price gaps on last x candles

    Code's All Right ™
    @C451
    @akjcodes so if you just create a script (calc() method) you'll get all ohlcv data automatically. Then you need just push it back to OV with settings({...}) method
    init: `
        // here you calculate your sum
        for (var i = 0 ...) { ohlcv[i] }
    `,
    post: `
        // here you post it to the settings:
        settings({ result })
    `
    Akila Thiwanka
    @akjcodes
    @C451 Thanks lot for this info 🎉. You're awesome 🤘🙏
    Code's All Right ™
    @C451
    @akjcodes 🍻
    MhdBssd
    @MhdBssd_gitlab
    Hello there :wave:
    MhdBssd
    @MhdBssd_gitlab
    I'm trying to customize the color of the candles on my charts with the "candles" overlay. I'd like to change the color of candles when its ohlc are contained within the previous candle (type 1 candles on this canvas https://excalidraw.com/#json=6246971773812736,mouPWIy9toX1RKfTlojG4w). However it seems like you can only style UP and DOWN candles (Close > Open and Close < Open). Does anyone have an idea of how I could implement that ? Thank you :thumbsup:
    Code's All Right ™
    @C451
    Hi @MhdBssd_gitlab if you don't want to make your own modification of Candles, check out https://github.com/tvjsx/trading-vue-js/tree/master/docs/overlays#style-object-format
    Akila Thiwanka
    @akjcodes
    @MhdBssd_gitlab You can use Candle.vue & candle.js to achieve that.
    MhdBssd
    @MhdBssd_gitlab
    Thanks for your answers ! I'll try it out :thumbsup:
    I'm new to this library but it looks very powerful. I'd like to contribute with a setup (I guess it's called "Overlays" here) for trading #thestrat (explained here, starts at 4:30 https://www.youtube.com/watch?v=Re0cGtFRhO0)
    Akila Thiwanka
    @akjcodes

    @MhdBssd_gitlab Basically you have to pass the previous candle to candle.js file from candle.vue (Modify this line for that new Candle(this, ctx, c)) This is what I did 👇
    1) Changed this for of for (var c of cnv.candles) { to loop to normal loop for (let i = 0; i < cnv.candles.length; i++) {
    2) Instead of this new Candle(this, ctx, c) ➡️

    const pc = i != 0 ? cnv.candles[i-1] : undefined; // previous candle 
    const c = cnv.candles[i]; // current candle
    new Candle(this, ctx, c, pc); // sending both candles

    3) change constructor function in candle.js to retrieve the previous candle ex: constructor(overlay, ctx, data, prev) then pass it to draw function this.draw(data, prev);

    4) Inside draw function do whatever logic you need and change body & wick colour

    *please ignore my namings 😅
    Code's All Right ™
    @C451
    I'm making a brief guide to Scripts (basically this problem as many others can be solved with Overlay+Script) Think of it as an embedded PINE
    Akila Thiwanka
    @akjcodes
    @C451 I was going to ask the same from you, whether it's possible to do these kinda things using scripts, instead of changing the core files. Thanks 🤘
    Will Drach
    @willdrach_twitter
    Hey @C451 , do you have a typical release cadence for this lib? I'm really in need of the fix for tvjsx/trading-vue-js#154 but it looks like you don't officially release all that often. I'm using a git override and that's fine for now, but just curious. Hell of a project btw, probably saved me a few hundred hours of work.
    Code's All Right ™
    @C451
    @willdrach_twitter hey, approximately once a month. I decreased the frequency to save time. The next vers coming soon.
    Yep, I myself wondering how the hell this happened. (it started just as a vue demo to learn the framework)
    Will Drach
    @willdrach_twitter
    Party on, thanks!
    Code's All Right ™
    @C451
     ## [0.9.0] - 2020-11-17
    
    * Scripts: advanced samplers (sym() function)
    * Implemented Dataset ops (update, merge, remove)
    * Countless small bug fixes as always
    * Scripts: add onclose()
    * Fixed auto-scroll (when new candle is added)
    * Scripts: offchart/onchart updates
    * DC: aggtool v2 (completely rewritten)
    * Custom legend buttons (your custom icon)
    * Tool groups
    * Scroll wheel modes: prevent, pass, click
    * WebWorker RAM limit
    * LineTool: add Ray mode
    * Legend buttons handlers [EXT]