OmniTrader Professional Forum OmniTrader Professional Forum
forums calendars search
today this week
 
register logon control panel Forum Rules
You are currently browsing as a guest.
You should logon to access more features
A Self-Moderated Community - ALL MEMBERS, PLEASE READ!
Vote for Members who contribute the most to your trading, and help us moderate content within the Forums.


  Current location        Thread information  
OmniTrader Professional Forum
OmniLanguage Discussion
custom text on the price chart
Last Activity 4/5/2021 3:04 PM
4 replies, 130 viewings

Jump to page : 1
Now viewing page 1 [25 messages per page]
 
back reply
Printer friendly version

^ Top
ap·pren·ticeGuru

Veteran
100
Posts: 114

Joined: 10/22/2010
Location: Columbia, MD

User Profile
 
Subject : custom text on the price chart
Posted : 4/3/2021 3:48 PM
Post #31487

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.

^ Top
Jim Dean

Sage
2000100010010010025
Posts: 3344

Joined: 3/13/2006
Location: L'ville, GA

User Profile
 
Subject : RE: custom text on the price chart
Posted : 4/3/2021 5:27 PM
Post #31488 - In reply to #31487

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!
^ Top
Barry Cohen

Idol
2000100
Posts: 2123

Joined: 1/1/1900

User Profile
 
Subject : RE: custom text on the price chart
Posted : 4/5/2021 9:50 AM
Post #31489 - In reply to #31487

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.

^ Top
ap·pren·ticeGuru

Veteran
100
Posts: 114

Joined: 10/22/2010
Location: Columbia, MD

User Profile
 
Subject : RE: custom text on the price chart
Posted : 4/5/2021 1:41 PM
Post #31490 - In reply to #31487

Thanks Barry ... I am getting a compiling error on this line,

bDraw = C PlotText("myText", 0.98 * L, If(bDraw, C, ""))

Thank You.

^ Top
Barry Cohen

Idol
2000100
Posts: 2123

Joined: 1/1/1900

User Profile
 
Subject : RE: custom text on the price chart
Posted : 4/5/2021 3:04 PM
Post #31491 - In reply to #31490

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)

Jump to page : 1
Now viewing page 1 [25 messages per page]
back reply

Legend    Action      Notification  
Administrator
Forum Moderator
Registered User
Unregistered User
E-Mail this thread to a friend
Toggle e-mail notification


Nirvana Systems
For any problems or issues please contact our Webmaster at webmaster@nirvsys.com.