Hi,
Is there an example of how to create custom icons on an indicator? For example how to add an icon like you do on the Bookmap Icebergs onchart addon? Is it using the Screenspace painter?
Example of custom icons?
-
- Posts: 24
- Joined: Wed May 26, 2021 12:13 pm
- Has thanked: 2 times
-
- Posts: 548
- Joined: Mon Jul 09, 2018 11:18 am
- Has thanked: 25 times
- Been thanked: 85 times
Re: Example of custom icons?
The icons on your image is ScreenSpacePainter.
Also, an indicator is able to draw simple icons (example).
Also, an indicator is able to draw simple icons (example).
-
- Posts: 24
- Joined: Wed May 26, 2021 12:13 pm
- Has thanked: 2 times
Re: Example of custom icons?
Hi Andrey, is there an example on how to add this offset line from the the price to the icon?
-
- Posts: 548
- Joined: Mon Jul 09, 2018 11:18 am
- Has thanked: 25 times
- Been thanked: 85 times
-
- Site Admin
- Posts: 278
- Joined: Mon Jun 11, 2018 11:44 am
- Has thanked: 2 times
- Been thanked: 31 times
Re: Example of custom icons?
Hi. Let me jump in... While there is no readily available example for the offset specifically, there is nothing special about the offset. Take a look at ScreenSpacePainter demos: https://github.com/BookmapAPI/DemoStrat ... acepainter
SSP API relies on combination of data and pixel coordinates, so noting prevents you from preparing a main icon, drawing it, say "50 px below the actual event", and then drawing the line joining those two points.
SSP API relies on combination of data and pixel coordinates, so noting prevents you from preparing a main icon, drawing it, say "50 px below the actual event", and then drawing the line joining those two points.
-
- Posts: 24
- Joined: Wed May 26, 2021 12:13 pm
- Has thanked: 2 times