Is there a way to control the order in which addons are overlaid on top of one another?

Custom indicators, trading strategies, data export and recording and more...
dmavro
Posts: 31
Joined: Thu Sep 24, 2020 9:20 pm
Been thanked: 1 time

Is there a way to control the order in which addons are overlaid on top of one another?

Post by dmavro » Thu Apr 22, 2021 4:12 pm

Is there a way in which i can give one addon a priority over another one? As an example, id like to be able to have one addon enabled with line widths of 5 and then have another addon have line widths of 3. Then if they happen to have same values for day or at that moment you would be able to clearly see the thinner line on top of the wider line from the other addon. Can this be done somehow?

Thanks,

Dean

AndreyR
Posts: 409
Joined: Mon Jul 09, 2018 11:18 am
Has thanked: 17 times
Been thanked: 70 times

Re: Is there a way to control the order in which addons are overlaid on top of one another?

Post by AndreyR » Fri Apr 23, 2021 8:41 am

Hi Dean,
  • Simplified API - use your Indicator's setRenderPriority(int priority) method. From Javadoc: "Essentially controls Z (depth) coordinate of the line. Lines with higher values will be "closer" to the screen (on top of the ones with lower values). See LayerRenderPriority for reference values. You should normally specify the position relative to one of the values specified in it."
  • Core API - set graphLayerRenderPriority for your Layer1ApiUserMessageModifyIndicator (the field is accessible)

dmavro
Posts: 31
Joined: Thu Sep 24, 2020 9:20 pm
Been thanked: 1 time

Re: Is there a way to control the order in which addons are overlaid on top of one another?

Post by dmavro » Sun Apr 25, 2021 3:58 am

Andrey,

Having an issue getting setRenderPriority to work. It errors no matter which way i try implementing it. I just used Shift&F2 to look at Indicator and IndicatorModifiable in my velox.api.layer1.simplified javadoc and they dont even reference it like this page on the Bookmap website does. Is there an update to the API or something?

Thanks,

Dean

dmavro
Posts: 31
Joined: Thu Sep 24, 2020 9:20 pm
Been thanked: 1 time

Re: Is there a way to control the order in which addons are overlaid on top of one another?

Post by dmavro » Sun Apr 25, 2021 2:40 pm

Woke up thinking about a couple other things...

1. My build.gradle file references core and simplified versions 7.1.0.35 is that still current?
2. Could my javadoc just be outdated somehow and im just implementing 'setRenderPriority' wrong? 
3. Is there a package that i needed to import at the beginning of my project?

Thanks,
Dean
 

AndreyR
Posts: 409
Joined: Mon Jul 09, 2018 11:18 am
Has thanked: 17 times
Been thanked: 70 times

Re: Is there a way to control the order in which addons are overlaid on top of one another?

Post by AndreyR » Mon Apr 26, 2021 7:05 am

Hi Dean,
right, pls change the core/simplified libraries versions in your build.gradle to 7.1.0.66

dmavro
Posts: 31
Joined: Thu Sep 24, 2020 9:20 pm
Been thanked: 1 time

Re: Is there a way to control the order in which addons are overlaid on top of one another?

Post by dmavro » Tue Apr 27, 2021 3:22 pm

Issue resolved.

Thanks Andrey!

Post Reply