Horizontal lines from file

Here you can post and download custom indicators. PLEASE: Do not start topics unless you are posting your own indicator, they will be moved to appropriate section even if you do.

Moderator: admin

Horizontal lines from file

Postby Alexander.Gettinger » Wed Apr 18, 2012 3:02 pm

The indicator draws a horizontal lines in accordance with the data from the file.

Strings of input file must have such format:
[Price] [R] [G] [B] [Style] [Size] [Name], where
Price - price of line,
R, G, B are a components of line color,
Style, Size - style and size of line (style may be SOLID, DOT, DASH or DASHDOT),
Name - name of line.

You may not specify color, style, width and name of lines. In this case, will be used by the default settings.

HorizontalLines.PNG


Download:
DrawHorizontalLines.lua
(4.26 KiB) Downloaded 1495 times


Sample of input file:
HLSample.csv
(82 Bytes) Downloaded 1309 times
Alexander.Gettinger
FXCodeBase: Confirmed User
 
Posts: 3785
Joined: Wed Mar 31, 2010 9:40 pm
Location: Russia, Omsk

Re: Horizontal lines from file

Postby Rachid » Thu Jun 28, 2012 12:43 pm

Hi,

Is it possible to draw the lines from date to date (different dates for each line)? for example:

1 - first line from 01/01/2012 9:30 to 02/03/2012 16:30
2- Second line from 07/01/2012 9:30 to 05/04/2012 12:00
...so on

the dates should be in the file too.

Thank you
Rachid
 
Posts: 16
Joined: Thu Jan 06, 2011 2:33 pm

Re: Horizontal lines from file

Postby Apprentice » Fri Jun 29, 2012 3:56 am

Your request is added to the development list.
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 36435
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

Re: Horizontal lines from file

Postby Alexander.Gettinger » Mon Jul 02, 2012 2:48 pm

The indicator with start and end dates of line.

Strings of input file must have such format:
[Price] [StartDate] [EndDate] [R] [G] [B] [Style] [Size] [Name], where
Price - price of line,
StartDate, EndDate - start and end dates of line with format MM/DD/YYYY HH:MM,
R, G, B are a components of line color,
Style, Size - style and size of line (style may be SOLID, DOT, DASH or DASHDOT),
Name - name of line.

Download:
DrawHorizontalLines2.lua
(5.5 KiB) Downloaded 1226 times
Alexander.Gettinger
FXCodeBase: Confirmed User
 
Posts: 3785
Joined: Wed Mar 31, 2010 9:40 pm
Location: Russia, Omsk

Re: Horizontal lines from file

Postby Rachid » Wed Jul 04, 2012 2:40 pm

Work perfectly, thanks
Rachid
 
Posts: 16
Joined: Thu Jan 06, 2011 2:33 pm

Re: Horizontal lines from file

Postby SuperTrader » Wed Aug 15, 2012 11:46 am

This is a very useful indicator! Can we please have a little modification on its first version (the original LUA file, without the dates on the lines): Suppose there are 60 prices for drawing horizontal lines in a text file: If a price appears 2 or more times in that list, can we please have the output line on the chart drawn twice as thick ? (width 2, so it stands out from the other lines on the chart). And if a price appears 3 times in our text file, have the output line on the chart drawn thrice as thick (width 3). But if it's easier for you, let's just have width=2 for all lines that their prices appear "2 or more times" in our file (if the code finds a duplicate price, then makes the line thicker). That would be really great ! Thank you very much in advance guys ! :)
User avatar
SuperTrader
 
Posts: 84
Joined: Thu May 20, 2010 12:52 pm
Location: Europe

Re: Horizontal lines from file

Postby Apprentice » Thu Aug 16, 2012 11:45 am

Your request is added to the development list.
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 36435
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

Re: Horizontal lines from file

Postby SuperTrader » Thu Aug 16, 2012 2:01 pm

Thank you Apprentice. :) The reason for asking this modification, is that traders often visit several research sites on the internet (i.e. Daily FX, etc) and read many articles in there, technical or fundamental ones, where they may come across some interesting price levels written in the articles or shown on the charts of those sites, that may want to store somewhere for their future reference and trading (i.e. I'm doing this every day for the last couple of years).

Also in the beginning of each trading day I'm looking at my own blank charts (for several fx pairs and different timeframes) and take notes of the levels I find interesting for a number of reasons (historically, S+R, etc).

This text file is a great place to store many such price levels (several dozens often), as the indicator can later draw them on charts and visually help traders on their trading! Now, if the same price level is reported on two or more sites (or let's say "sources" in general), it makes this level more "important" and it should stand out in some way from the other lines when finally drawn !! :D ;)
User avatar
SuperTrader
 
Posts: 84
Joined: Thu May 20, 2010 12:52 pm
Location: Europe

Re: Horizontal lines from file

Postby Alexander.Gettinger » Thu Sep 06, 2012 3:13 pm

SuperTrader wrote:This is a very useful indicator! Can we please have a little modification on its first version (the original LUA file, without the dates on the lines): Suppose there are 60 prices for drawing horizontal lines in a text file: If a price appears 2 or more times in that list, can we please have the output line on the chart drawn twice as thick ? (width 2, so it stands out from the other lines on the chart). And if a price appears 3 times in our text file, have the output line on the chart drawn thrice as thick (width 3). But if it's easier for you, let's just have width=2 for all lines that their prices appear "2 or more times" in our file (if the code finds a duplicate price, then makes the line thicker). That would be really great ! Thank you very much in advance guys ! :)


Please, see this indicator:
DrawHorizontalLines3.lua
(4.7 KiB) Downloaded 1265 times
Alexander.Gettinger
FXCodeBase: Confirmed User
 
Posts: 3785
Joined: Wed Mar 31, 2010 9:40 pm
Location: Russia, Omsk

Re: Horizontal lines from file

Postby SuperTrader » Wed Sep 12, 2012 5:05 am

thank you very much Alexander, works great ! :)
User avatar
SuperTrader
 
Posts: 84
Joined: Thu May 20, 2010 12:52 pm
Location: Europe

Next

Return to Custom Indicators

Who is online

Users browsing this forum: No registered users and 25 guests