# Pip distance from moving average indicator

2020.01.06 Indicators

## Specification

Hello,

I need an indicator that draws two lines (or dots) on the chart, one above and one under the last price and moving average crossing.

Parameters:

- usual Moving average parameters(Period, Method, Apply to)

- numbers of candles we analize backwards (PARAM1)

- numbers of maximum distances to average (PARAM2)

- color for 2 lines

The distance of the lines from the last closed calndle will be calculated as follows:

1.) go back PARAM1 candles and calculate all maximal price distances for long and short (closing price above and under the moving average) from the moving average. A distance is defined as the maximal candle closing distance between the price and moving average between two price and moving average crosses. Please take a look at the attached prictures. The blue triangles show the price and moving average crossings. The white lines are the maximal distances between those crossings.

2.) Calcualte the average of the highest distances given by PARAM2

3.) draw a line above and one under the last price and moving average crossing for each following candle until the price and moving average crosses

4.) calculate and draw again, if the price crosses the moving average

Example:

Step 1.) we go back 1000(PARAM1) candles and analize the maximul distances and we get this distances:

- 10 pips

- 20 pips

- 30 pips

- 40 pips

- 50 pips

2.) if PARAM2 = 3, we take the 3 highest distance and build the simple average : (30 + 40 + 50) / 3 = 40

3.) Draw the two lines ( can be also dots like Parabolic SAR)

JPG
Distance.JPG
125.7 Kb

## Responded

1
Developer 1
2020.01.06
Rating
5
(2)
Projects
3
0%
Arbitration
1
0% / 0%
Overdue
1
33%
Working
2
Developer 2
2020.01.06
Rating
4.87
(116)
Projects
136
41%
Arbitration
30
7% / 77%
Overdue
19
14%
Working
3
Developer 3
2020.01.06
Rating
5
(3)
Projects
3
0%
Arbitration
1
0% / 100%
Overdue
0
Free
4
Developer 4
2020.01.06
Rating
4.56
(9)
Projects
17
18%
Arbitration
15
20% / 47%
Overdue
9
53%
Working
5
Developer 5
2020.01.06
Rating
4.43
(7)
Projects
11
18%
Arbitration
7
14% / 57%
Overdue
1
9%
6
Developer 6
2020.01.06
Rating
5
(1)
Projects
1
0%
Arbitration
1
0% / 100%
Overdue
0
Working
7
Developer 7
2020.01.06
Rating
5
(366)
Projects
612
69%
Arbitration
12
50% / 17%
Overdue
208
34%
Free
8
Developer 8
2020.01.06
Rating
5
(64)
Projects
84
26%
Arbitration
10
0% / 90%
Overdue
16
19%
Free
9
Developer 9
2020.01.07
Rating
4.86
(355)
Projects
636
50%
Arbitration
197
54% / 29%
Overdue
138
22%
Busy

### Project information

Budget
30+ USD
VAT (19%): 5.7 USD
Total: 35.7 USD
For the developer
27 USD

Placed orders1
Arbitrage count1