## Price Trend

There are several ways of depicting price trends on a price chart.

• The first is the simple way

The simple method is to connect two price points that are considered to represent a trend line. This method can be seen in the image below ( A, B, D ). In practice we connect two price points based on 2 highs (A) and 2 lows (B), or cross the highs and lows (D).

• The second is by using the calculation of the average price value

Which is commonly known in statistics, namely the least squares method. (C in the picture). In this method we have to choose prices that will be used as the basis for observations. There are 6 prices that can be used as a basis, the opening price (O), the high price (H), the lowest price (L), the closing price (C), the mid price between the high and the low (M) and the mid price between the open and close (B). 1

#### Creating a Price Trend Algorithm

To create an algorithm for the two methods above you can use "f(x) BaS Creator" in the trend & Fibonacci filter section. Activate the Trend Lines Filter and select the Add button. 2
• Range

The choice of range can be the number of periods, or according to a specified time limit.

• Period

The selection of the period will be determined according to the previously selected range. If you use a period, the start of the trend will be determined by the index value and how many bars will be observed, while if you use a time constraint, the start and end time of the observation must be determined.

• Deviation Index

It will only be active if you use a simple method. This will calculate how far the end of the trend is allowed against the index bar observations. Observation bar index is the initial index of the selected period.

• Deviation Curve

This will limit how far the presence of the bar from the opposite price point of the observed is allowed. For example, if you observe the trend of the highest price ( H ) it will check the previous high price point which is smaller in value than the price point at the base of the trend. This tool applies to the simple method.

• Initial Point Detection

This section only works on the Least Squares method. If this is activated, the software will detect at which point the trend begins, for example the trend is an uptrend, then the starting point of a trend will start from the lowest price point.

• Speed

This will calculate how fast a trend is relative to the number of bars. The unit is calculated based on the unit value of the price change from the beginning to the end of the trend and how many bars are in the trend.

• Triangle Ratios

This will limit the value of the ratio to the trend, this section is only used on trends with a simple method and at certain price options. For more details see the image below. Trend Comparison

3

As in the example picture above, the existence of triangular ratios is very important. From the example it can be seen that the overall trend is indeed up, but a trend reversal has appeared at point C, on the other hand the narrow distance between C and D, reinforced by the distance AC and AD which are already equivalent, it can be concluded that the upward trend in prices is saturated.

#### Trend Comparison

Comparison of 2 trend lines can be in the form of convergence, line intersection, elasticity and endpoint position value. Trend comparisons can also be made even though the methods used are different. 4
###### Narrow 5
###### Widen 6
###### Cross Over Trend Comparison

7
• Observation

Trends are past data, we can make observations based on past data as well. For example, we observe the trend at 12:00 hours while the price trend observed is the price trend at 8:00 to 11:00. Observations can also be made on a time frame that is different from the time frame for the trend being used. For example, you create a trend on the chart with the H1 time frame but observe it on the M5 time frame.

• Last Value

The trend line can be extended, even though the trend lasts from 8:00 to 11:00 hours but if it is 14:00 hours, then the trend value can be obtained.

• Trend Value

Trend can be in the form of different prices, for example we compare the trend of the highest price (H) and the lowest price (L) then the values ​​can be compared

• Elasticity

The elasticity of 2 trends can be either they run parallel or flat, the end points of the two are approaching or narrowing, or it can be that the end points of both are moving away from each other or widening. The magnitude of the difference in the three cases can be ascertained by the deviation value, because sometimes according to the naked eye on the graph the two are parallel but in computer calculations they are close to each other.

• CrossOver

The cases may or may not intersect, or simply be ignored.

• Start Period

Comparison of values ​​from the base of the two trends.

• End Period

Comparison of values ​​from the ends of the two trends.

#### Price Vs Trend

As previously explained, a trend is something that has passed, but nevertheless its existence is used to predict which direction the trend will continue. In this case, with the projection line, we can find out at which point the price is at, whether it is below the trend line or above the trend line. The current price position compared to the previous trend

8 Filter variables for price and trend comparison

9
• Trend ID

ID of pre-made trends

• Index Bar

The index position of the required bar

• Time Frame

Even though the trend we created earlier was a trend on the H1 time frame for example, but we can observe prices on a different time frame. In this section we can also use the time parameter.

• Position of prices

Here we can determine the position of prices as a condition

• Deviation

The amount of deviation that is allowed as a condition where the value of the trend point and adjacent prices are considered the same

## Fibonacci Retracement

You can find an explanation of the Fibonacci formula from other references, here we will only explain how to use the Fibonacci chart to build a trading algorithm. In practice, the Fibonacci chart is used to see the level of price levels, it can be an increase in price or a decrease in price. Fibonacci Chart

10

#### Variables on Fibonacci Retracement to create Filter

Fibonacci variables in some ways have similarities with trend variables, especially in the simple zig-zag method, such as trend direction, and range of observations.So it will only be explained in a different part only. Fibonacci Variables

11
• References

In contrast to the trend, here we will only be limited to two price options. Where the two options show the start and end of the Fibonacci trend. The highs and the lows at which the base options will be determined by the previous trend options. So if we choose a positive trend, the lowest price will be the base and the highest price will be the end of a trend in the selected data range, on the other hand, if the choice is negative, the base will start with the highest price and the lowest price will be the end of the trend.

Meanwhile, if we choose the reference price at the opening and closing prices, both positive and negative trends will always start with the highest price from the opening and end with the lowest price from the close.

• Fixed Value 100%

In this section, we will limit the value of the Fibonacci trend at 100% with a certain point value. For example, let's say we start at 0% at a low price with a limit of 250 points the trend's height is a 100% Fibonacci value.

• Limit Floating Value 100%

This section will only be active if Fixed Value 100% is not enabled. This will filter the Fibonacci trend value at 100%, if the minimum value is not reached or the maximum value is exceeded then the filter will be false.

• Position (OHLCMB)

This will filter price positions against Fibonacci values on bars with a certain index. Price Positioning Filter

12