# Pip distance from moving average indicator

2020.01.06 Индикаторы

## Техническое задание

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

## Откликнулись

1
Разработчик 1
2020.01.06
Оценка
5
(4)
Проекты
8
0%
Арбитраж
5
20% / 20%
Просрочено
1
13%
Свободен
2
Разработчик 2
2020.01.06
Оценка
4.87
(116)
Проекты
137
41%
Арбитраж
30
7% / 77%
Просрочено
20
15%
Свободен
3
Разработчик 3
2020.01.06
Оценка
5
(5)
Проекты
5
20%
Арбитраж
1
0% / 100%
Просрочено
0
Свободен
4
Разработчик 4
2020.01.06
Оценка
4.73
(15)
Проекты
27
11%
Арбитраж
16
19% / 50%
Просрочено
16
59%
Занят
5
Разработчик 5
2020.01.06
Оценка
4.43
(7)
Проекты
11
18%
Арбитраж
8
13% / 50%
Просрочено
1
9%
Работает
6
Разработчик 6
2020.01.06
Оценка
5
(3)
Проекты
3
33%
Арбитраж
2
0% / 50%
Просрочено
0
Загружен
7
Разработчик 7
2020.01.06
Оценка
5
(374)
Проекты
622
69%
Арбитраж
12
50% / 17%
Просрочено
209
34%
Загружен
8
Разработчик 8
2020.01.06
Оценка
5
(67)
Проекты
88
27%
Арбитраж
10
0% / 90%
Просрочено
17
19%
Работает
9
Разработчик 9
2020.01.07
Оценка
4.85
(359)
Проекты
650
49%
Арбитраж
212
55% / 27%
Просрочено
138
21%
Загружен

### Информация о проекте

Бюджет
30+ USD
VAT (19%): 5.7 USD
Итого: 35.7 USD
Исполнителю
27 USD