Example of custom icons?

Custom indicators, trading strategies, data export and recording and more...
fenepet965
Posts: 24
Joined: Wed May 26, 2021 12:13 pm
Has thanked: 2 times

Example of custom icons?

Post by fenepet965 » Thu May 27, 2021 12:43 pm

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?



Image

Andry API support
Posts: 548
Joined: Mon Jul 09, 2018 11:18 am
Has thanked: 25 times
Been thanked: 85 times

Re: Example of custom icons?

Post by Andry API support » Fri May 28, 2021 6:50 am

The icons on your image is ScreenSpacePainter.
Also, an indicator is able to draw simple icons (example).

fenepet965
Posts: 24
Joined: Wed May 26, 2021 12:13 pm
Has thanked: 2 times

Re: Example of custom icons?

Post by fenepet965 » Fri May 28, 2021 8:00 pm

Hi Andrey, is there an example on how to add this offset line from the the price to the icon?

Andry API support
Posts: 548
Joined: Mon Jul 09, 2018 11:18 am
Has thanked: 25 times
Been thanked: 85 times

Re: Example of custom icons?

Post by Andry API support » Sat May 29, 2021 4:12 pm

Sorry, currently no examples for offset lines are available.

Svyatoslav
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?

Post by Svyatoslav » Sat May 29, 2021 7:38 pm

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.

fenepet965
Posts: 24
Joined: Wed May 26, 2021 12:13 pm
Has thanked: 2 times

Re: Example of custom icons?

Post by fenepet965 » Mon May 31, 2021 12:25 pm

thanks for the explanation

Post Reply