Brian’s MT4 Scripts & Indicators 1.0
Please follow the steps below to use the scripts & Indicators on MT4 correctly.
Indicator: Symbol Info.ex4
Installation: Copy to "MT4 > Experts > Indicators" Folder
Use: A simple Indicator that sits in the bottom right corner of the chart and gives real time info on Account Balance, Spread, Swaps, Time remaining on this Bar/Candle, etc.
Inputs: "x_distance" & "y_distance" allow the Text to be moved out further from the corner if required.
"Color" Inputs allow each item of info to be given its own color. If you set any of the Input colors to “NONE” then that piece if info will not appear and all other info will move up so there are no blank lines.
"Text Font" & "Font Size" allow the Font to be changed.
"Font Sizing" adjusts the space between each line of text and this may have to be adjusted if Font or Size are changed.
"Corner" allows the user to change where the Symbol Info appears in the chart window ... 0 = Top Left 1 = Top Right 2 = Bottom Left 3 = Bottom Right (default)
Notes: If you use the Indicator on a Non-Expiring Demo (which many Brokers will give you if you have a Live Account and ask) then the Title line will show the Account as LIVE. This is a limitation of Broker/Platform and there is no workaround – just be aware.
Indicator: Round Numbers.ex4
Installation: Copy to "MT4 > Experts > Indicators" Folder
Use: This Indicator draws Horizontal Lines on the chart to try to help identify Support/Resistance at Round Numbers.
Inputs: "Update Timer" lets the user adjust how often (in seconds) the Indicator redraws to reduce resource usage (otherwise the Indicator would get redrawn every Tick).
"Grid" lets the user manually specify where to place the drawn lines. If this is 0 (default) then pre-set values are used. Only edit this if you are unhappy with the default pre-set values.
"LineStyle" allows various line type to be used for the Grid ... 0 = Solid 1 = Dash 2 = Dot (default) 3 = Dash-Dot 4 = Dash-Dot-Dot
"LineColor" is the color of the Grid lines, change as required. Default is MidnightBlue - a Dark color to be subtle on standard Black background Spartan Fx charts.
"LineWidth" can be from 1 (default) to 5 but if set at more than 1, Metatrader will force the Line Style to be Solid.
"Background" if set at True (default), then the Grid Lines will be drawn behind Price bars, change to False if you wish the Grid to be drawn on top of Price
Notes: The Grid lines can be selected by mistake when trying to select other Objects on screen, then moved or deleted by mistake. The line will be redrawn in the correct position on the next refresh.
Pre-set values for Grid spacing are set internally as follows (in pips) ...
Forex: M1 = 10 M5 = 10 M15 = 25 M30 = 25 H1 = 50 H4 = 100 D1 = 250 W1 = 500 MN = 1000
SPI200: M1 = 50 M5 = 100 M15 = 250 M30 = 250 H1 = 500 H4 = 500
D1 = 1000 W1 = 5000 MN = 5000
SP500: M1 = 10 M5 = 25 M15 = 50 M30 = 50 H1 = 50 H4 = 100 D1 = 250 W1 = 500 MN = 1000
XAGUSD & XAUUSD: M1 = 50 M5 = 50 M15 = 100 M30 = 250 H1 = 250 H4 = 500 D1 = 500 W1 = 1000 MN = 2500 These are the values I like after using the Indicator since I wrote it in 2011 but you can adjust if you prefer using the "Grid" Input. The Indicator only draws Grid line on the visible chart to reduce resource use and will redraw with the pre-set Grid size any time the Chart timeframe is changed.
Indicator: SFx TLB.ex4
Installation: Copy to "MT4 > Experts > Indicators" Folder
Use: This is my own version of another Indicator I saw somewhere that gave an Alert and/or email if a Trend Line got touched. I wanted one that only gave the Alarm/Alert if the Trend Line was broken.
Setup: Draw a Trend Line (or Horizontal Line) on a chart. Select the Line then Right Click > Trend line Properties. Enter TLB (must be Capitals) at the START of the Description, other text can follow. Add the SFx TLB Indicator to the Chart ("TL Break" will display on screen).
The Indicator will now watch any/all Trend Lines or Horizontal Lines that have the text TLB at the start of their Description. It will check EVERY Tick.
If the Open is on one side of a Line and the Close is on the other then the Indcator will ... Open an Alert Window. Send an email (if setup to do so). Rename the Line description by removing the TLB part, any other text will be left alone. That particular line will not cause another Alert/email becasue the TLB has been removed.
Inputs: "EmailAlert" - will send an email if True (default) and you have set up email in MT4 (Tools > Options > Email).
Font Type, Size & Color can be edited.
"TextWindow" can be used to place the Text in different windows. The main chart screen is Window 0 (default) and this is the only Window in the default Spartan Fx template so would not normally be changed.
"TextCorner" allows the user to change where the Symbol Info appears in the chart window ... 0 = Top Left (default) 1 = Top Right 2 = Bottom Left 3 = Bottom Right
"x_distance" & "y_distance" allow the Text to be moved out further from the corner if required.
Notes: The Indicator uses actual Open & Close for calcs, I have not found the need to use Heikin Ashi Open & Close values.
Line descriptions can contain more than just the text TLB. Some examples ... "tlb" - no good, must be ALL CAPS. "1TLB" - no good, TLB must be the FIRST text. "TLB" - good. "TLB W1 Trend Line" - good, will be renamed to "W1 Trend Line" ie the Space after TLB will be removed.
Script: Kill Symbol.ex4
Installation: Copy to "MT4 > Experts > Scripts" Folder
Use: Use this Script with Care!
This Script was designed to quickly close all trades on a particular currency Pair. Simply drag the Script onto THE CORRECT PAIR Chart and the Script will attempt to ... Close ALL Open trades on that Pair. Cancel any Pending Limit Entries on that Pair. Cancel any Pending Stop Entries on that Pair.
Once this Script is triggered, there is no going back - multiple trades will close very quickly. That's the point of the Script but just make sure you drag it onto the correct currency Pair.
Script: MTF TrendLine.ex4
Installation: p Copy to "MT4 > Experts > Scripts" Folder
Use: MTF - Multi Time Frame. It annoys me that when I draw lots of Trend Lines on shorter time frame charts (say M1 or M5) then when I look at H4 or D1 charts there is just a mess of lines that I have to delete to see the Price Bars!
This Script was written to help with that problem. If you draw a Trend Line with this Indicator instead of the one built into MT4, then this Trend Line will be visible ... On the Time Frame of the chart you originally drew it on. On the next higher Time Frame chart, but no Time Frames higher than that. ALL lower Time Frame charts.
Inputs: None - this Script is designed to be fast so there is no Input Dialog. Pre-set values are as follows: Line Style = Solid. Line Width = 3. Background = False (ie it will draw ON TOP of the Price Bars). color = RosyBrown (suitable IMHO for default Spartan Fx Template colors).
Notes: Some examples, if you use MTF Trend Line to draw a Trend Line on a
H1 chart, then that trend line will be visible on M1, M5, M15, M30, H1, H4 only but will be hidden on D1, W1 and MN Charts.
MN Chart, then it will be visible on EVERY Time Frame Chart.
M5 Chart, then it will be visible on only M1, M5 and M15 charts and will not "mess up" the Charts on higher Time frames.
The Trend Line will be drawn from the Low of 1/4 of the Chart Bars back to the Current Bar Low and must then be Selected and dragged to the correct position.
Trend Lines drawn with this Script are named with the Chart Symbol + Chart Time Frame + Serial Number.