mjj38
- ago
Currently SetBarColor resides in StrategyBase. It would be nice to create indicators that color the bars based on the indicator (kinda like a PaintBar study in Tradestation).
0
990
10 Replies

Reply

Bookmark

Sort
- ago
#1
Are you looking for this?
CODE:
SetSeriesBarColor

https://www.wealth-lab.com/Support/ApiReference/UserStrategyBase
0
Glitch8
 ( 10.62% )
- ago
#2
How would that work if you drop two opposing such indicators?
0
mjj38
- ago
#3
It would conflict, but I can't see anytime you would want more than one indicator of that type running at once.

0
mjj38
- ago
#4
Thought process would to be able to do something like this for visualizing trend or visualizing an oscillator on price.

0
Glitch8
 ( 10.62% )
- ago
#5
Yes Tradestation does this differently with a paint bar study. In WL this is handled by the strategy. I’m hesitant to add more complexity and possibly unexpected results by also adding this functionality to an indicator.
2
- ago
#6
QUOTE:
possibly unexpected results

Yes,... and not everyone would want all the indicators to work this way.

However, anyone could create a MyIndicatorBase that inherits from IndicatorBase, then create their own indicators from this new base class with this functionality. Let us know how this works out for you.

Another option would be to create a BarColorize derived (interface?) class to act as a "toolbox" for performing this task on any indicator. Then one could create new indicators by inheriting from existing indicators employing this BarColorize toolbox interface. This behavior might be useful for some indicators. (I'm just wondering what should be included in the BarColorize toolbox? Did you have several numerical criteria in mind?)
0
mjj38
- ago
#7
Could I accomplish this by creating a custom PlotStyle?
0
Glitch8
 ( 10.62% )
- ago
#8
Sure, in a custom PlotStyle you can do anything.
1
mjj38
- ago
#9
How would I change the Bar Series colors in the Render method? Do I need to redraw the bar? or is there a way to just change the bar color?
0
Glitch8
 ( 10.62% )
- ago
#10
You would need to redraw the data yourself. There is no method to change the higher level bar-color.
1

Reply

Bookmark

Sort