# 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

2020.01.06
レーティング
5
(4)
プロジェクト
6
0%

4
25% / 25%

1
17%

2

2020.01.06
レーティング
4.87
(116)
プロジェクト
137
41%

30
7% / 77%

20
15%
3

2020.01.06
レーティング
5
(5)
プロジェクト
5
20%

1
0% / 100%

0
4

2020.01.06
レーティング
4.67
(12)
プロジェクト
24
13%

16
19% / 50%

14
58%

5

2020.01.06
レーティング
4.43
(7)
プロジェクト
11
18%

7
14% / 57%

1
9%

6

2020.01.06
レーティング
5
(3)
プロジェクト
3
33%

2
0% / 50%

1
33%

7

2020.01.06
レーティング
5
(371)
プロジェクト
619
69%

12
50% / 17%

209
34%

8

2020.01.06
レーティング
5
(65)
プロジェクト
85
27%

10
0% / 90%

17
20%

9

2020.01.07
レーティング
4.85
(357)
プロジェクト
646
49%

205
55% / 28%

138
21%

### プロジェクト情報

30+ USD
VAT(付加価値税) (19%): 5.7 USD

27 USD