current price line
Posted: Wed May 17, 2006 4:44 pm
Hello,
are you using bar charts (not candles) and often wonder where the current price is? With bar charts, the right "tick" line is so tiny that sometimes it is almost impossible to have a quick reference on where the hell the closing price within the bar is
Well, no more, !_current_price_line indicator will show you that:
Horizontal line is plotted at the current closing price level and changes with the price change. You can set the color of the line when the price is higher, lower or same as the opening price of the bar. You can also set whether you want to plot the line to the left, to the right or to both sides of the bar for better visibility.
ELD file attached below.
Michal
are you using bar charts (not candles) and often wonder where the current price is? With bar charts, the right "tick" line is so tiny that sometimes it is almost impossible to have a quick reference on where the hell the closing price within the bar is
Well, no more, !_current_price_line indicator will show you that:
Horizontal line is plotted at the current closing price level and changes with the price change. You can set the color of the line when the price is higher, lower or same as the opening price of the bar. You can also set whether you want to plot the line to the left, to the right or to both sides of the bar for better visibility.
ELD file attached below.
Michal
Code: Select all
{
program name: current price trendline
last change: May/17/2006
version: 1.02
author: Michal Kreslik
email: michal.kreslik@kreslik.com
comments:
intended for bar charts to help
visually spot where the current price is
}
inputs:
iDownColor( red ),
iUpColor( green ),
iNoChangeColor( lightgray ),
iDrawToTheRight( true ),
iDrawToTheLeft( true );
vars:
vTrendLineID( 0 ),
vTrendLineAction1( 0 ),
vTrendLineAction2( 0 ),
vTrendLineAction3( 0 );
If LastBarOnChart then
begin
vTrendLineID = TL_New(date, time, close, date, time, close);
if iDrawToTheRight then
vTrendLineAction1 = TL_SetExtRight(vTrendLineID, true);
if iDrawToTheLeft then
vTrendLineAction2 = TL_SetExtLeft(vTrendLineID, true);
if close = open then TL_SetColor(vTrendLineID, iNoChangeColor);
if close > open then TL_SetColor(vTrendLineID, iUpColor);
if close < open then TL_SetColor(vTrendLineID, iDownColor);
if vTrendLineID[1] > 0 AND vTrendLineID <> vTrendLineID[1] then
vTrendLineAction3 = TL_Delete(vTrendLineID[1]);
end;