|
ap·pren·ticeGuru
 Veteran
 Posts: 114
Joined: 10/22/2010
Location: Columbia, MD
User Profile |
Hello,
On the new OT update, I noticed the following:
"Added a new OmniLanguage plotting function to show custom text on the price chart. This is the basic syntax: PlotText("Name", Price, "Text") Note that the text must be explicitly set to an empty string in order to avoid printing the prior bar's value."
Please help how this could be written in an example OmniLanguage code, to demonstrate on the price chart. Thanks.
|
|
Jim Dean
 Sage
      Posts: 3344
Joined: 3/13/2006
Location: L'ville, GA
User Profile |
BARRY: please pass this on to the developers and reply
I was very pleased to see this but of course I'm hoping you might tweak it a bit to improve it. PLEASE:
1. after the "TextToBePrinted", please add an integer to control the point SIZE
2. after the size integer, please add a param to specify the COLOR of the text
3. provide PlotText and PlotPriceText, to spec the Indicator pane or Price pane
Since these all follow the natural patterns of existing commands, I hope you'll see the value of them, and implement them soon.
THANK YOU!
|
|
Barry Cohen
 Idol
  Posts: 2123
Joined: 1/1/1900
User Profile |
This example draws a horizontal line equal to the Close for 10 bars when a certain event occurs:
Dim bDraw As Boolean
bDraw = C PlotText("myText", 0.98 * L, If(bDraw, C, ""))
If bDraw Then
PlotPriceTrendLine( "myLine", Bar, C, Bar + 10, C)
End If
PlotPriceTrendLine can also take a line color and width as parameters.
|
|
ap·pren·ticeGuru
 Veteran
 Posts: 114
Joined: 10/22/2010
Location: Columbia, MD
User Profile |
Thanks Barry ... I am getting a compiling error on this line,
bDraw = C PlotText("myText", 0.98 * L, If(bDraw, C, ""))
Thank You.
|
|
Barry Cohen
 Idol
  Posts: 2123
Joined: 1/1/1900
User Profile |
Try this attached file. Just place the text file in the OT2021/VBA/Indicators folder. OT should be able to compile it if you are on at least PR2E.
Attached file : PlotTextEx.zip (0KB - 16 downloads)
|