- ago
Arrow Visual is needed on the indicator area below the chart of the symbol


How to code the following ?
When histogram crosses below zero, plot/draw red arrow down
when histogram crosses above 0, plot/draw green arrow up


1
75
Solved
5 Answers

Reply

Bookmark

Sort
- ago
#1
You can plot arrows 1) as Unicode characters using DrawText or 2) as bitmap images with DrawImageAt. Sample code can be found here:
https://www.wealth-lab.com/Discussion/Images-Icons-to-use-with-DrawImage-5712

For solution #1, most draw* methods contain a parameter to specify the pane. You should specify one when plotting your histogram. Then pass on that string to DrawText:
CODE:
string paneTag = "myIndicatorPane"

https://www.wealth-lab.com/Support/ApiReference/UserStrategyBase

For #2 you should find a small-size bitmap image somewhere.
1
Cone7
- ago
#2
In Build 6 we added a "new override to DrawBarAnnotation that lets you pass a TextShape enumerated parameter, to more easily render various common shapes on the chart."

See QuickRef > UserStrategyBase > TextShape and example
3
Best Answer
- ago
#3
QUOTE:
a new override overload to DrawBarAnnotation that lets you pass a TextShape enumerated parameter

I found it after struggling. If you hover over DrawBarAnnotation in the WL editor, IntelliSense does not find the TextShape enum version. Also, under DrawBarAnnotation in the QuickRef, there's no mention of it as an overloaded parameter option, which is where it should be in the first place. I'm running WL8 Build 9.
0
Cone7
- ago
#4
QUOTE:
in the WL editor, IntelliSense does not find the TextShape enum


Struggling, really? You've been at this long enough to know overloads that are selectable in intellisense using the up/down arrows or clicking on the "1 of n" triangles.

2
- ago
#5
I stand corrected. The overloads are working as expected. I was working from DrawBarAnnotation example (from the QuickRef) that already had the first parameter filled in as a string, so it wasn't showing the other overloads.

Thanks for the clarification.
1

Reply

Bookmark

Sort