Indicator that shows support & resistance with dot

MQL4 指标 脚本

指定

Write an indicator/script that output the following variable:

1. PriceHighBox = #Price_level

2. PriceLowBox = #Price_level

3. PriceBoxDirection = up or down

4. Draw red and blue dots to indicate support and resistance

I'll need the script for this indicator. 

User input:

1. Y pips to define peaks and support,

2. X pips for clearance rule 

Valid scenario A:

A peak has to rise up and down in price by Y amount of pips (user input). Vice versa for support.

[A: The highest price of 3 peaks (for uptrend; 3 peaks cannot be consecutively higher) with [B: one identified support or resistance] that has a [C: clearance more than X pips]. Draw [D: blue dot (below low)] and [E: red dot (above high)] on chart. (see graphic below)

S_A 

 Valid scenario B:

[A: The Lowest price of 3 supports (for downtrend; 3 supports cannot be consecutively lower) with [B: one identified peak] that has a [C: clearance more than X pips]. Draw [D: blue dot (below low)] and [E: red dot (above high)] on chart. (see graphic below)

 SB

 Valid scenario C:

[A: The highest price of 3 peaks (for downtrend; 3 peaks cannot be consecutively lower) with [B: one identified support] that has a [C: clearance more than X pips]. Draw [D: blue dot (below low)] and [E: red dot (above high)] on chart. (see graphic below)

SC

 Valid scenario D:

[A: The Lowest price of 3 supports (for uptrend; 3 supports cannot be consecutively higher) with [B: one identified peak] that has a [C: clearance more than X pips]. Draw [D: blue dot (below low)] and [E: red dot (above high)] on chart. (see graphic below)

 SD

 

 

 

 

反馈

1
开发者 1
等级
(94)
项目
162
40%
仲裁
20
15% / 75%
逾期
73
45%
空闲
发布者: 3 代码
2
开发者 2
等级
(195)
项目
395
28%
仲裁
155
20% / 52%
逾期
112
28%
空闲
3
开发者 3
等级
(803)
项目
1123
43%
仲裁
47
49% / 23%
逾期
84
7%
空闲
4
开发者 4
等级
(46)
项目
73
16%
仲裁
13
8% / 92%
逾期
37
51%
空闲
5
开发者 5
等级
(64)
项目
144
46%
仲裁
19
42% / 16%
逾期
32
22%
空闲

项目信息

预算
10 - 20 USD
截止日期
 1  2 天