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.


Only Forum Moderators, Administrators, and the owner of this message may delete it.

 
Matthew Greenslet

Idol
2000252525
Posts: 2077

Joined: 2/27/2006

User Profile
 
Subject : RE: How do we Plot a line at a price level?
Posted : 1/25/2010 10:22 AM
Post #15000 - In reply to #14983

Jim's code is one way. That will plot an indicator line across the price chart at a fixed value. PlotPrice("FixVal", 10100) would work just the same. Also if you wanted to make the level user selectable rather than hard coding it you could use a parameter.

#Indicator
#PARAM "PriceLevel", 10100, 1, 20000
PlotPrice("FixedVal", PriceLevel)
Return PriceLevel

There are several OL plot functions which can be found by selecting 'Plotting" from the section filter dropdown. If you are wanting to render this line in the price pane you can use PlotPrice, or PlotPriceTrendline. If either of these functions are used to plot a different indicator value this will set the default internal pane from an indicator pane to the price pane. After which you could also use PlotLabel (if no other plotting is done this will plot in an indicator pane). PlotPrice will plot an indicator line in the price chart. If you want to specify the starting and ending point of the line you can use PlotTrendLine. PlotLabel will draw a non-selectable line at a specified price and list the price in the scale on the left.

Alternatively if you are just drawing a price line on the price you can just use the drawing tools to draw multiple types of trendlines (segment, ray, or line). Trendlines might be a more versatile solution since you can set trendlines to alert lines to play a sound and/or display a message box when they are violated.
Deleting message 15000 : RE: How do we Plot a line at a price level?


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