I have an indicator created from one of the (Layer1SimpleAttachable) samples that plots in the BOTTOM.
I have not been able to figure out how to change the color when it crosses a value (e.g Yellow below x, Green above x). Can you please provide a sample / code snippet that supports this?
Also, I added HistoricalModeListener to the Implementation, but my indicator does not seem to get exercised on the historical data that is loaded prior to the running session. The CVD indicator that comes out of the box does. What else do I need to change to have my indicator do the same? Again, a snippet sample would help.
Thanks
Sample Code to use 2 colors on indicator line and process history
-
- Posts: 43
- Joined: Mon Feb 08, 2021 5:37 pm
- Been thanked: 1 time
-
- Site Admin
- Posts: 278
- Joined: Mon Jun 11, 2018 11:44 am
- Has thanked: 2 times
- Been thanked: 31 times
Re: Sample Code to use 2 colors on indicator line and process history
Both of those features - coloring based on range and ability to run on backfill data (as opposed to only the data received after bookmap start) are part of core layer1 api but are not part of simplified. Core layer1 is more complicated and less clean, but those features are present there already. Andrey should be able to provide you some additional information a bit later.
-
- Posts: 43
- Joined: Mon Feb 08, 2021 5:37 pm
- Been thanked: 1 time
Re: Sample Code to use 2 colors on indicator line and process history
Thank you, look forward to getting the code.
-
- Posts: 43
- Joined: Mon Feb 08, 2021 5:37 pm
- Been thanked: 1 time
Re: Sample Code to use 2 colors on indicator line and process history
Thank you, look forward to getting the code.
-
- Posts: 548
- Joined: Mon Jul 09, 2018 11:18 am
- Has thanked: 25 times
- Been thanked: 85 times
Re: Sample Code to use 2 colors on indicator line and process history
Hi! the implementation depends on API you are using.
For the Simplified API there is no 2 colored lines but you can emulate it with sections colored differently drawn with different colored IndicatorModifiable instances. That does not look good sometimes (due to data aggregation the sections look separated along the vertical axis).
I have attached the example for the Core API.
For the Simplified API there is no 2 colored lines but you can emulate it with sections colored differently drawn with different colored IndicatorModifiable instances. That does not look good sometimes (due to data aggregation the sections look separated along the vertical axis).
I have attached the example for the Core API.
- Attachments
-
- devmarkers.zip
- (4.75 KiB) Downloaded 182 times