Trabajo finalizado
![](https://c.mql5.com/i/avatar/avatar_na2.png)
![](https://c.mql5.com/i/avatar/avatar_na2.png)
Tarea técnica
Multi Time Frame Support & Resistance Lines Indicator with On Screen Toggle Buttons
Indicator draws current (untested) and old (tested and surpassed) lines on the chart based on SR criteria.
SR Criteria – 1 Candle close exactly equal to the immediate next candle open
Support – Bear candle close equal to Bull candle open
Resistance – Bull candle close equal to Bear candle open
CURRENT Support Lines
Based on candles below current price
2 consecutive candles - Bear candle, and immediately followed by a Bull candle
Bear candle closed price is exactly the same as Bull candle open price
Line remains the user selected color and style until a candle closes below it on its corresponding time frame).
OLD Support Lines
Based on Current Support Lines that a candle has closed below on its corresponding time frame.
Changes to user selected color and style after a candle has closed below on its corresponding time frame.
For example, if I am looking at the 15 minute chart, and a 15 minute candle closes below a Daily support line, that line remains a current support line. When a Daily candle closes below that support line, then that line becomes an Old support line and changes color and style to the Old Support Line settings.
Line is drawn from the 2 candles when it formed and extend all the way through to the candle that closed through it on its respective time frame.
CURRENT Resistance Lines
Based on candles above current price
2 consecutive candles – Bull candle, and immediately followed by a Bear candle
Bull candle closed price is exactly the same as Bear candle open price
Line remains the user selected color and style until a candle closes above it on its corresponding time frame).
OLD Resistance Lines
Based on Current Resistance Lines that a candle has closed above on its corresponding time
frame.
Changes to user selected color and style after a candle has closed above on its corresponding time frame.
For example, if I am looking at the 15 minute chart, and a 15 minute candle closes above a Daily resistance line, that line remains a current support line. When a Daily candle closes above that support line, then that line becomes an Old support line and changes color and style to the Old Support Line settings.
Line is drawn from the 2 candles when it formed and extend all the way through to the candle that closed through it on its respective time frame.
Only higher time frame lines drawn on the viewed time frame
For example
15M chart should show all higher time frame lines (1H, 4H, D1, W1, MN)
1H chart should show 1H, 4H, D1, W1, MN lines.
4H chart should show 4H, D1, W1, MN lines. Should not show 1H lines.
D1 chart should show D1, W1, MN lines. Should not show 1H, 4H, lines.
W1 chart should show W1, MN lines. Should not show 1H, 4H, D1 lines.
MN chart should show MN lines. Should not show 1H, 4H, D1, W1 lines.
On chart/on screen Panel with toggle buttons to show/hide lines
Separate buttons for each time frame and each type of line. For example…
R | 1H | 4H | D1 | W1 | MN | Round # | Overlap |
Rtest | 1H | 4H | D1 | W1 | MN | ||
S | 1H | 4H | D1 | W1 | MN | Half # | Clear |
Stest | 1H | 4H | D1 | W1 | MN |
Default function (with Overlap button not selected)
Each button press would hide any other lines displayed on screen by the indicator
For example, if R/4H button is selected, indicator would print lines for R/4H. Then if
S/D1 button is selected, indicator hides R/4H lines and prints only S/D1 lines on screen.
Overlap (with Overlap button selected)
Overlap button would make lines for all selected buttons print on screen simultaneously
For example, turn Overlap button on. If button for R/4H is selected, indicator prints lines for R/4H., Then if S/D1 button is selected, indicator continues to print R/4H lines on screen and also prints S/D1 lines on screen simultaneously.
Clear
Clear button would hide all lines currently printed on screen by the indicator.
Panel Input Setting
X-axis input settings for precise horizontal placement of panel
Y-axis input settings for precise vertical placement of panel
Panel anchor options (Upper Left, Lower Left, Upper Right, Lower Right)
Button Off background color
Button On background color
Button On Text color
Button Off Text color
Text font size
Must display properly on UHD resolution screen.
Separate Input Settings for Each Set of Lines:
CURRENT Monthly Support Lines
Color
Width
Style (Solid, Dot, Dash, Dot-Dash, Dot-Dash-Dot)
2 Candle Close/Open Allowed Difference
User input amount difference between bear candle close price to bull candle open price.
Default = 0, so close/open price exactly the same
Ability to enter differences up to 5 decimal places
Label Price – Show/Hide (True/False)
Label Price Font Size
Label Information – Show/Hide (True/False) - MN, S, mm/yyyy
Label Information Font Size
Label Location (above line)
Left edge of screen
Middle of screen
Right edge of screen
Label color should match selected line color
CURRENT Monthly Resistance Lines
Color
Width
Style
2 Candle Close/Open Allowed Difference
Label Price
Label Price Font Size
Label Information - MN, R, mm/yyyy
Label Information Font Size
Label Location
OLD Monthly Support Lines
Color
Width
Style
2 Candle Close/Open Allowed Difference
Label Price
Label Price Font Size
Label Information – MN, old, S, mm/yyyy
Label Information Font Size
Label Location
OLD Monthly Resistance Lines
Color
Width
Style
2 Candle Close/Open Allowed Difference
Label Price
Label Price Font Size
Label Information – MN, old, R, mm/yyyy
Label Information Font Size
Label Location
CURRENT Weekly Support Lines
Color
Width
Style
2 Candle Close/Open Allowed Difference
Label Price
Label Price Font Size
Label Information – W1, S, mm/dd/yyyy (dd should be first day of the week)
Label Information Font Size
Label Location
CURRENT Weekly Resistance Lines
Color
Width
Style
2 Candle Close/Open Allowed Difference
Label Price
Label Price Font Size
Label Information – W1, R, mm/dd/yyyy
Label Information Font Size
OLD Weekly Support Lines
Color
Width
Style
2 Candle Close/Open Allowed Difference
Label Price
Label Price Font Size
Label Information – W1, old, S, mm/dd/yyyy
Label Information Font Size
OLD Weekly Resistance Lines
Color
Width
Style
2 Candle Close/Open Allowed Difference
Label Price
Label Price Font Size
Label Information – W1, old, R, mm/yyyy
Label Information Font Size
CURRENT Daily Support Lines
Color
Width
Style
2 Candle Close/Open Allowed Difference
Label Price
Label Price Font Size
Label Information – D1, S, mm/dd/yyyy
Label Information Font Size
CURRENT Daily Resistance Lines
Color
Width
Style
2 Candle Close/Open Allowed Difference
Label Price
Label Price Font Size
Label Information – D1, R, mm/dd/yyyy
Label Information Font Size
OLD Daily Support Lines
Color
Width
Style
2 Candle Close/Open Allowed Difference
Label Price
Label Price Font Size
Label Information – D1, old, S, mm/dd/yyyy
Label Information Font Size
OLD Daily Resistance Lines
Color
Width
Style
2 Candle Close/Open Allowed Difference
Label Price
Label Price Font Size
Label Information – D1, old, R, mm/dd/yyyy
Label Information Font Size
CURRENT 4 Hour Support Lines
Color
Width
Style
2 Candle Close/Open Allowed Difference
Label Price
Label Price Font Size
Label Information – 4H, S, mm/dd/yyyy, xx:xx(xx:xx = candle time)
Label Information Font Size
CURRENT 4 Hour Resistance Lines
Color
Width
Style
2 Candle Close/Open Allowed Difference
Label Price
Label Price Font Size
Label Information – 4H, old, R, mm/dd/yyyy, xx:xx
Label Information Font Size
OLD 4 Hour Support Lines
Color
Width
Style
2 Candle Close/Open Allowed Difference
Label Price
Label Price Font Size
Label Information – 4H, old, S, mm/dd/yyyy, xx:xx
Label Information Font Size
OLD 4 Hour Resistance Lines
Color
Width
Style
2 Candle Close/Open Allowed Difference
Label Price
Label Price Font Size
Label Information – 4H, old, R, mm/dd/yyyy, xx:xx
Label Information Font Size
CURRENT 1 Hour Support Lines
Color
Width
Style
2 Candle Close/Open Allowed Difference
Label Price
Label Price Font Size
Label Information – 1H, S, mm/dd/yyyy, xx:xx
Label Information Font Size
CURRENT 1 Hour Resistance Lines
Color
Width
Style
2 Candle Close/Open Allowed Difference
Label Price
Label Price Font Size
Label Information – 1H, R, mm/dd/yyyy, xx:xx
Label Information Font Size
OLD 1 Hour Support Lines
Color
Width
Style
2 Candle Close/Open Allowed Difference
Label Price
Label Price Font Size
Label Information – 1H, old, S, mm/dd/yyyy, xx:xx
Label Information Font Size
OLD 1 Hour Resistance Lines
Color
Width
Style
2 Candle Close/Open Allowed Difference
Label Price
Label Price Font Size
Label Information – 1H, old, R, mm/dd/yyyy, xx:xx
Label Information Font Size
Round Number Lines - lines placed at round number price levels, e.g., 1.36000
Color
Width
Style
2 Candle Close/Open Allowed Difference
Label Price
Half-Round Number Lines - lines placed at round number price levels, e.g., 1.36500
Color
Width
Style
2 Candle Close/Open Allowed Difference
Label Prices
UPDATE...adding the following to this project:
Period - Input Setting for number of candles/bars in history to be used to determine SR lines
Maximum Number of Lines - Input Settings that user can enter the maximum number of Current lines to be drawn for each time frame. For example, draw a maximum of 4 Current Monthly Resistance lines, max of 2 Monthly Support lines, max of 10 Daily Resistance lines, max of 5 Daily Support, etc...
Label Information
Touches - Number of times price touched a line level within the selected period
Nearby - Number of times price has come within "x" number of pips to a drawn line. "x" should be a field in the Input Settings for the user to enter a number.
Show/Hide option for each part of the label information, so user can select to see only the information relevant to them
I can refer you to indicators that have similar functionality to some of the things I am asking for to be more clear.