@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
## [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]
πππ## [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]
@C451 that's quite hidden, but exactly what I'm looking for. Thank you!
On another note, I started using the Ichimoku overlay and I found it kind of buggy with the small spaces between the drawn elements, where the wicks are, and triangles drawn with different colors where the cloud switches from positive to negative (sorry, I don't have the perfect trading vocab for this). So, locally I rewrote it and was thinking about publishing it, just in case it helps others. I'll still have to clean it up, but should I just send a pull request to the current Ichimoku overlay, or create a new "Ichimoku improved" version?
I'm also working on a Point&Figure overlay, but that's nowhere near ready.
Cool, I'd be glad to see it when it's done.
@C451 I've been playing around with the new calc()
, but I'm not sure I understand how for example an Ichimoku can push certain data into the future. For example, SpanA and SpanB should by default show data 26 days ahead, and the lagging Span 26 days in the past (the lagging could be easy to solve).
Before calc()
I went around this by adding extra candles to the data that I passed to the overlay. But as calc()
automatically gets the candle data, I feel like I shouldn't mess with that. So, is there a way to handle this situation?
## [0.10.0] - 2020-12-07
The last version before RC (an important message after the notes):
* The first package of mobile improvements
* Enhances skins
* Small modifications of scripts execution
* Improvements of Interfaces (aka inline overlay UI)
* Script fixes (update onchart/offchart OVs)
* New aggtype: copy (fast aggregation through copying)
* CSS tranforms support (transition)
* Overlay name templates, e.g. "RSI, $length"
* Fixed loading animation for some cases
2 weeks before he release. The testing season is opened!V1 20/12/2020
The changes since the previous version:
* 60% Performance boost
* Std-lib: new functions (signal, onclose, ...)
* DC sampler improvements
Thank you to everyone who participated by asking the right questing, throwing in new feature ideas and finding sneaky bugs.
Without you watching the process it wouldn't be possible to create this architecture & design.
V1 20/12/2020
The changes since the previous version:* 60% Performance boost * Std-lib: new functions (signal, onclose, ...) * DC sampler improvements
Thank you to everyone who participated by asking the right questing, throwing in new feature ideas and finding sneaky bugs.
Without you watching the process it wouldn't be possible to create this architecture & design.
π