Directions

This is a carry over in the 'Need lines indior' thread. I presumed that Spaced Lines merited its own thread as I can edit post #1 every time that I update the indior.

Latest update: version 3.02, uploaded July 1, 2011
Latest changes to this post in red typeface


Installation

Download the EX4 file to the .../experts/indiors folder.

If you would like to enter the parameters by means of a parameter file, then download the TXT file to the .../ /experts/files folder.


Parameters

ParameterFile - if blank, the parameter file Presets--Spaced Lines.TXT will be used. Settings in this file will override all those entered in the conversation window once the indior is attached/edited. If you enter a value (e.g. XXX), then the parameter file Presets--Spaced Lines.XXX will be used instead. This makes it effortless to switch between a lot of different settings. If you leave the parameter set as NONE, then (supposing a file Presets--Spaced Lines.NONE does not exist), the settings you input MT4's conversation window will be used. All of parameter files must reside in the .../experts/files folder. Watch 'PARAMETER FILE' section below for more information

StartPrice - simply inputting a number (e.g. 1.3165, 85.389) will mean that the price entered will be used as the 'zero point' where the traces are plotted. Otherwise you are able to make an entry such as:
Cx,y - that means that the close x pubs past (0 is the currently forming pub), rounded to the nearest y pips, will be used as the zero point, e.g., to draw around numbers starting at XX50, enter C0,50 or simply C,50
Ox,y
Hx,y
Lx,y
work exactly the same, using the open, high, low prices instead.
You can omit the ,y part, if you do not require rounding, e.g. C0 (or C) will use the close of pub #0 as the zero stage

PriceLevels - as much as 100 amounts might be entered, separated by commas
-- a zero value (0) will plot a line at the zero stage
-- optimistic values (X) will plot a line X pips over the zero stage
-- negative values (-X) will plot a line X pips below the zero stage
If you place AbsolutePrices to TRUE, the StartPrice and zero value doesn't apply. Just enter price worth, separated by commas.

AbsolutePrices - if TRUE, PriceLevels represent total price worth, and StartPrice (zero point) doesn't apply. If FALSE, then PriceLevels are calculated relative to the zero stage.

LineColors - up to 100 values could be entered, separated by commas. These determine the color which will be used to plot the line at the corresponding entrance in PriceLevels. If only one value is entered, all lines will be plotted in that color

LineStyles - up to 100 values could be entered, separated by commas. These determine the width/style which will be used to plot the line at the corresponding entrance in PriceLevels. If only one value is entered, all lines will be plotted with this width/style. Valid values for style are: 10 = good line of width 1; 11 = dashed line; 12 = dotted line; 13 = dash-dot; 14 = dash-dot-dot; 20, 30, 40, 50 = good line of width 2, 3, 4, 5 respectively.

TimeFrames - determine which timeframes where the traces will be visible. Entries are M1. Can be upper or lowercase, use commas to separate entries.

CounterLookback - if 0, this has no impact.
If a certain number, a count is made of how many of the last CounterLookback candles have reached or intersected this price level line.
If a negative number, a count is made of how many of the candles showing in the price window have reached or intersected this price level line.
The count is displayed at the left of the chart, since the object description. You must have 'Show thing descriptions' assessed ON (press F8, and pick out the frequent tab) in order to view the descriptions.


Example #1: to plot traces at around number amounts 50 pips apart, with XX00 values as solid lines, and XX50 values as dotted lines:

Inserted Code StartPrice = C0,100; PriceLevels = -500,-450,-400,-350,-300,-250,-200,-150,-100,-50,0,50,100,150,200,250,300,350,400,450,500; LineColors = DimGray; LineStyles = 10,12,10,12,10,12,10,12,10,12,10,12,10,12,10,12,10 ,12,10,12,10; CounterLookback = 0;

Example #2: to plot dashed lines at XX20 and XX80 degrees:

Inserted Code StartPrice = C0,100; PriceLevels = -480,-420,-380,-320,-280,-220,-180,-120,-80,-20,20,80,120,180,220,280,320,380,420,480; LineColors = DimGray; LineStyles = 11; CounterLookback = 0;

Parameter file

To remove the nuisance of having to retype the same parameter settings every time you join the indior to a chart, You've Got two choices:

1. Use MT4 templates (however these overwrite any other indiors, items, etc which you also need on the chart). In this case, the indior settings are described when you attach or edit the indior, using the built-in conversation of MT4.

2. Use parameter file(s), as follows:If you enter nothing or TXT to the ParameterFile setting, then the indior looks for a parameter file called Presets--Spaced Lines.TXT in the .../ /experts/files folder. If you enter any additional text (e.g. XXX, 001, etc) to the ParameterFile setting, then the indior looks for a parameter file called Presets--Spaced Lines.XXX, Presets--Spaced Lines.001, etc in the .../experts/files folder. (This allows you to set up a definition in every file, then simply enter the file suffix when you join the indior). Then the settings in the conversation of MT4 will be used if the file can not be found. If the file is found, then the settings in the file will be used. Simply enter the title of a file that is non-existent, if you want to force the usage of the dialog settings.

Use a text editor such as Notepad to see and/or edit the parameter presets files.

To disable an entry into the file, start the line with two slashes (//). (This means that the setting specified in the MT4 conversation will be used.) To re-enable it, remove the slashes. If you've got multiple 'unslashed' entries in the file, the final will be used.

You can use any variety of embedded spaces or underscores, and/or any combo of lower or upper case, to aid readability, however you desire.

Every line in the file (including blank lines, and lines beginning with two slashes) MUST end with a semi-colon (; ). Failure to do so will cause unpredictable consequences.

To save typing and enhance accuracy, copy/paste the sample traces in the file. To disable the file, rename it, or delete its content.

To get any changes take immediate impact, either (1) re-attach the indior to your chart; (2) edit the indior (media Ctrl-I); or (3) toggle between timeframes.


Change history

v 3.00: Initial release.

V 3.01: Additional CounterLookback parameter.

V 3.02: Additional AbsolutePrices parameter.


Terms and conditions

#61623; All code is provided FREE of charge. It might not be sold or distributed commercially.

#61623; Software is provided in an 'as is' basis. I'm not supplying a programming or troubleshooting service. Source code isn't currently available.

#61623; There is not any guarantee that the software is appropriate for purpose, or free of errors. Download and use the indior(s) at your own risk; I accept no liability for personal harm or financial losses.

___________________________

MT4 Indiors/EAs by Hanover:

Present Strength #8212; exhibit line-based plot of weighted average of currency (as opposed to pair) power
Present Prices #8212; screen line-based plots of almost any combo of pairs/timeframes in your current chart, to compare their relative power
Present Candles #8212; screen candles of any combo of pairs/timeframes in your current chart
Present SR #8212; auto-plot horizontal support/resistance lines based on a vast array of settings
Present News #8212; screen upcoming and/or historical news announcements fromnigeriaforextradingcalendar; countdown/alert upcoming announcements
Daily Lines/Boxes #8212; auto-plot vertical or horizontal lines, boxes, symbols on user-defined times, days of the week, etc
Screen Info all pairs #8212; screen spread, daily range, dollars/pip, swap rates etc for all pairs
Spaced Lines #8212; auto-plot horizontal lines in your charts
Stealth Master EA #8212; conceal your SL and TP from unscrupulous br0kers!
Do-it-yourself alerts builder kit #8212; code template which you can copy/paste which will add pop-up or email alerts to most 'standard' indiors
https://www.nigeriaforextrading.com/...8427438379.ex4
https://www.nigeriaforextrading.com/...teresting.html