Seer logo - advanced backtesting for stock, futures and forex trading systems using using technical analysis indicators, charts, money management and position sizing
Functions by Category Functions by Alphabetical list

PlotLine ([start bar],[start value],[end bar],[end value],[color],[style])

Usable in an seer chart object

This function plots a line on a chart.

This function draws a line based upon the passed in parameters. This function is similar to DrawLine, however this function uses a relative coordinate positioning system.

Color can be any color constant, or result from the color function.

Style can be one of the following:

  1. Dots: Horizontal line as dots.
  2. Dashes: Horizontal line as dashes.

A solid line is drawn as a default.

Example:

#Plot a line linking successive new all time high closing prices
PlotPrice('OHLC');

#declare and set our variables
my $nowclose; 
my $alltimeclose     = Value(Close,BarsBack); 
my $alltimeclosebar  = BarsBack;
#loop round all the bars in this chart
foreach my $bar (BarsBack+1..NumberOfBars) { 
  #set nowclose to the value of the close
  $nowclose=Value(Close,$bar);
  #is nowclose greater than the all time high close?
  if ($nowclose > $alltimeclose) { 
    #plot the line from the old all time high to the new one
    PlotLine($alltimeclosebar ,$alltimeclose,$bar,$nowclose,Red,Dots); 
    #record the new highest close
    $alltimeclose    =$nowclose;
    $alltimeclosebar =$bar;
  }
}

Related functions:

PlotPrice , PlotColumn , PlotFixedLine , PlotSetScale , PlotText , PlotFixedLine , PlotCandlestick , PlotTellTale , PlotPAC , PlotBand , PlotGrid , DrawLine , DrawText , DrawRectangle , DrawFilledRectangle , SetChartOption , Color , Dashes , Dots , Vline , SetBarBackground , SetBarColor , ChartInputSlider , ChartInputCombobox

© 2008 seer trading systems ltd
feedback FAQ legal privacy