Canvas is cool! - page 89

 
Nikolai Semko #:
The point is that when implementing something like this, you will inevitably encounter a catastrophic lack of slider length.
As a rule, this is implemented in a single slider, not in one, the width of which can be changed by dragging the button by its edges, thus changing the scale. But this approach does not solve the problem of slider length, although it is more convenient.

yeah, I've already encountered it ;)

made a long one

All this tambourine dancing was just for the purpose of

to see how really and most importantly from what and why the price moves.

it's all clear now ;))))

of course it is beautifully drawn in the terminal, but it is not true!

correct chart in the trailer
Files:
777.png  15 kb
 
Renat Akhtyamov #:

yep, bumped into it already ;)

made a long

All this tambourine dancing was just for the purpose of

to see how it really goes and, most importantly, what makes the price go and why.

Well, it's all clear now ;))))

in my opinion, it is much more convenient and visual to have a two-dimensional slider, the height coordinate of which is responsible for the scale.
Something like this:

in this case you need only one mouse click with movement to get to any moment of time of the whole history with any scale.

 
Nikolai Semko #:

As for me, a two-dimensional slider with a height coordinate responsible for scale is much more convenient and visual.
Something like this:

you have a very cool one ;)

 
Renat Akhtyamov #:

you got a really cool one ;)

Thanks,
I want to make a full-fledged one on WebAssembly (on Rust).

 
Nikolai Semko #:

Thanks,
I want to make a full-fledged one of these on WebAssembley (on Rust)

Yeah.

The main thing is that you don't have to switch anything.

The minimum timeframe is scaled.

and I am puzzled - how is it that signals are different on different timeframes at the same price?

Who goes to the woods, who goes to the woods....

Timeframes are not even necessary in essence.

ticks are needed and that's all

 
Renat Akhtyamov #:

Yeah

You don't have to switch anything.

the minimum timeframe is scaled.

and I'm puzzled - how come the signals are different on different timeframes at the same price?

who goes to the forest, who goes to the wood....

timeframes are not even necessary in essence.

You need ticks, that's all.

Yes, the current model of timeframes is very inconvenient. Each bar of the senior TF contains a different number of minute bars. With this structure, if the senior TF is smoothly reduced to the junior one, the charts will not coincide.
I have found an acceptable solution for myself.
From M1 I form the following index TFs M2, M4, M8, M16, M32, M64, M128, M256, M1024, M2048 , M4096, M8192.
In this case, each bar of any timeframe is guaranteed to contain the same number of M1.
All TFs are scaled equally and very easy TF recalculation literally in one mathematical action. And there are many more advantages.
The fact that each bar of a senior TF can be of different time density does not bother me, because it is not the time density that is more important, but the trading density.
It is quite acceptable to use the number of minute bars to measure the trading density.
We can go further and use ticks to measure the trading density.
 
Nikolai Semko #:
Yes, the current timeframe model is very inconvenient. Each bar of the senior TF contains a different number of minute bars. With such a structure, if the senior TF is smoothly reduced to the junior one, the charts will not coincide.
I have found an acceptable solution for myself.
From M1 I form the following index TFs M2, M4, M8, M16, M32, M64, M128, M256, M1024, M2048 , M4096, M8192.
In this case, each bar of any timeframe is guaranteed to contain the same amount of M1.
All TFs are scaled equally and very easy TF recalculation literally in one mathematical action. And a lot of other advantages.
The fact that each bar of a senior TF can be of different time density does not bother me, because it is not the time density that is more important, but the trading density.
It is quite acceptable to use the number of minute bars to measure the trading density.
We can go further and use ticks to measure the trading density.

I'm not quite right

not scaled, but compressed.

The TFs disappear.
 
Renat Akhtyamov #:

I wasn't quite right

not scaled, but compressed.

TFmas disappear
Since I use only M1, this problem does not exist for me.
Most likely it is a problem of synchronisation of relevance of forming arrays of senior TFs, because MQ has them all formed (calculated) from M1 too.
Or your mistake
 

Help me understand the concept of a graphical resource and how it differs from the concept of a graphical object in a graph.

For example, if I delete a graphical object created with Canvas using the ObjectDelete() function, and then in a loop I will create Canvas objects with different names again and again, but using the same instance of the Canvas class... and again delete graphical objects using ObjectDelete(). Is there any danger in this at all?

I just don't quite understand the difference between ObjectDelete() and C.Destroy() yet, but I'd like to understand....

 
leon_17 I delete a graphical object created with Canvas using the ObjectDelete() function, and then in a loop I will create Canvas objects with different names again and again, but using the same instance of the Canvas class... and again delete graphical objects using ObjectDelete(). Is it fraught with something at all?

I just don't quite understand the difference between ObjectDelete() and C.Destroy() yet, but I'd like to understand....

Canvas is an object to which an array of pixels is bound. The Resource is responsible for binding this array of pixels (see the bool function CCanvas::Create())
It is bad practice to delete and recreate a canvas all the time.
It is good practice to create a canvas when you need it and delete it when you don't need it anymore, for example, at the end of the programme.

Once you create a canvass object, you can clean it up, overwrite the pixel array every frame, resize the canvass and move it anywhere you want.

Reason: