Hi,
Is there a way to have the same indicator with different positive/negative colors using the Simplified API Wrapper?
Something similar to what the Bookmap Cumulative Volume Delta does.
I know we can do something with 2 indicators and set the other indicator do Double.NaN but I'm wondering if this can be done in a single indicator.
Thanks,
Indicator positive and negative colors on Simplified API
-
- Posts: 545
- Joined: Mon Jul 09, 2018 11:18 am
- Has thanked: 22 times
- Been thanked: 83 times
Re: Indicator positive and negative colors on Simplified API
Hi blk,
this cannot be done in a single indicator. Just like you said, you need to use two IndicatorModifiable instances which will alternate between visible and invisible (once Double.NaN value is added) states.
this cannot be done in a single indicator. Just like you said, you need to use two IndicatorModifiable instances which will alternate between visible and invisible (once Double.NaN value is added) states.
Code: Select all
// t is time value in nanos
line0.addPoint(t + 1, Double.NaN);
line1.addPoint(t, value);