分类
技术面及基本面分析

如何在Metatrader 4 (MT4)中设置抛物线转向指标(SAR)

Stochastic Oscillator

The Stochastic Oscillator Technical Indicator compares where a security’s price 如何在Metatrader 4 (MT4)中设置抛物线转向指标(SAR) closed relative to its price range over a given time period. The Stochastic Oscillator is displayed as two lines. The main line is called %K. The second line, called %D, is a Moving Average of %K. The %K line is usually displayed as a solid line and the %D line is usually displayed as a dotted line.

There are several ways to interpret a Stochastic Oscillator. Three popular methods include:

  • Buy when the Oscillator (either %K or 如何在Metatrader 4 (MT4)中设置抛物线转向指标(SAR) %D) falls below a specific level (for example, 20) and then rises above 如何在Metatrader 4 (MT4)中设置抛物线转向指标(SAR) that level. Sell when the Oscillator rises above a specific level (for example, 80) and then falls below that level;
  • Buy when the %K line 如何在Metatrader 4 (MT4)中设置抛物线转向指标(SAR) rises above the %D line and sell when the %K line falls below 如何在Metatrader 4 (MT4)中设置抛物线转向指标(SAR) the %D line;
  • Look for divergences. For instance: where prices are making 如何在Metatrader 4 (MT4)中设置抛物线转向指标(SAR) a series of new highs and the Stochastic Oscillator is failing to surpass 如何在Metatrader 4 (MT4)中设置抛物线转向指标(SAR) its previous highs.

chart_StochasticOs

Calculation

The Stochastic Oscillator has four variables:

  • %K periods. This is the number of time periods used in the stochastic calculation;
  • %K 如何在Metatrader 4 (MT4)中设置抛物线转向指标(SAR) Slowing Periods. This value controls the internal smoothing of %K. A value of 1 is considered a fast stochastic; a value of 3 is considered a slow stochastic;
  • %D periods. his is the number of time periods used when calculating a moving average of %K;
  • %D method. The method (i.e., Exponential, Simple, Smoothed, or Weighted) that is used to calculate %D.

The formula for %K is: %K = (CLOSE-LOW(%K))/(HIGH(%K)-LOW(%K))*100

Where:
CLOSE – is today’s closing price;
LOW(%K) – is the lowest low in %K periods;
HIGH(%K) – is the highest high in %K periods.

The %D moving average is calculated according to the formula: %D = SMA(%K, N)

Where:
N – is the smoothing period;
SMA – is the Simple Moving Average.

Parabolic SAR

Parabolic SAR Technical Indicator was developed for analyzing the trending markets. The indicator is constructed on the price chart. This indicator is similar to the Moving Average Technical Indicator with the only difference that Parabolic SAR moves with higher acceleration and may change its position in terms 如何在Metatrader 4 (MT4)中设置抛物线转向指标(SAR) of the price. The indicator is below the prices on the bull market (Up Trend), when it’s bearish (Down Trend), it is above the prices.

If 如何在Metatrader 4 (MT4)中设置抛物线转向指标(SAR) the price crosses Parabolic SAR lines, the indicator turns, and its further values 如何在Metatrader 4 (MT4)中设置抛物线转向指标(SAR) 如何在Metatrader 4 (MT4)中设置抛物线转向指标(SAR) are situated on the other side of the price. When such an indicator turn does take place, the maximum or the minimum price for the 如何在Metatrader 4 (MT4)中设置抛物线转向指标(SAR) previous period would serve as the starting point. When the indicator makes a 如何在Metatrader 4 (MT4)中设置抛物线转向指标(SAR) turn, it gives a signal of the trend end (correction stage or flat), or of its turn.

The Parabolic SAR is an outstanding indicator for providing exit points. Long positions should be closed when the price sinks below the 如何在Metatrader 4 (MT4)中设置抛物线转向指标(SAR) 如何在Metatrader 4 (MT4)中设置抛物线转向指标(SAR) SAR line, short positions should be closed when the price rises above the 如何在Metatrader 4 (MT4)中设置抛物线转向指标(SAR) 如何在Metatrader 4 (MT4)中设置抛物线转向指标(SAR) SAR line. It is often the case that the indicator serves as a 如何在Metatrader 4 (MT4)中设置抛物线转向指标(SAR) trailing stop line.

If the long position is open (i.e., the price is above the SAR line), the Parabolic SAR line will go up, regardless of what direction the prices take. The length of the SAR line movement 如何在Metatrader 4 (MT4)中设置抛物线转向指标(SAR) depends on the scale of the price movement.

chart_parabolicSAR

Calculation

Where:
SAR(i-1) – is the value of the indicator on the previous bar;
ACCELERATION – is the acceleration factor;
EPRICE(i-1) – is the highest (lowest) price for the previous period (EPRICE=HIGH for long positions and EPRICE=LOW for short positions).

The indicator value increases if the price of the current bar is higher than previous bullish 如何在Metatrader 4 (MT4)中设置抛物线转向指标(SAR) 如何在Metatrader 4 (MT4)中设置抛物线转向指标(SAR) and vice versa. The acceleration factor (ACCELERATION) will double at the same time, which would cause Parabolic SAR and the price to come together. In other words, the faster the price grows or sinks, the faster the indicator approaches 如何在Metatrader 4 (MT4)中设置抛物线转向指标(SAR) the price.

PSAR MT4 Expert Advisor

The Parabolic SAR, also known as PSAR, is a handy indicator to follow a trend. It can also be used in some instances as an entry signal or a trailing stop value. Below you can download a free expert advisor for MetaTrader 4 that uses PSAR indicator to open trades and to move the trailing stop.

About PSAR MT4 Expert Advisor

PSAR EA Start Window

Parameters

Input Parameters for Parabolic SAR MT4 Expert Advisor

    如何在Metatrader 4 (MT4)中设置抛物线转向指标(SAR)
  • Position Size — to define the position size.
  • Stop-loss in pips — this is the initial stop-loss price; it will be replaced by the trailing 如何在Metatrader 4 (MT4)中设置抛物线转向指标(SAR) stop.
  • Take-profit in pips.
  • Slippage in pips.
  • Enable trade — 如何在Metatrader 4 (MT4)中设置抛物线转向指标(SAR) to enable or disable the trading function.
  • PSAR Step — the first parameter to calculate PSAR. The default value is 0.2.
  • PSAR Max Step — the second parameter to calculate PSAR. The default value is 0.如何在Metatrader 4 (MT4)中设置抛物线转向指标(SAR) 02.
  • Magic Number — lets the EA tell the difference between its own orders and orders not opened by it.

Entry Signals

  • Entry Buy: 如何在Metatrader 4 (MT4)中设置抛物线转向指标(SAR) PSAR switches from above the previous bar to below the current bar.
  • Entry Sell: PSAR switches from below the previous bar to above the 如何在Metatrader 4 (MT4)中设置抛物线转向指标(SAR) 如何在Metatrader 4 (MT4)中设置抛物线转向指标(SAR) current bar.

PSAR MT4 EA - Entry and Exit Examples with Trailing Stop

Entry and Exit Examples with Trailing Stop

Exit Signals

  • Exit: Take-profit or trailing stop using PSAR.

Results on EUR/USD @ H1

Backtesting this expert advisor on the EUR/USD @ 1-hour timeframe shows poor results. Changing the currency pair or the timeframe doesn't change much substantially. It suffers greatly from spread losses due to being always in the market — as one trade 如何在Metatrader 4 (MT4)中设置抛物线转向指标(SAR) is closed a new one is opened.

Backtesting report for PSAR EA EURUSD 1H

Backtesting Report for PSAR EA on EUR/USD @ 1H

Strength

Can potentially perform well under ideal conditions with clearly defined and long-lasting trends.

Weakness

Heavily affected by ranging and choppy periods while always keeping some 如何在Metatrader 4 (MT4)中设置抛物线转向指标(SAR) position (either buy or sell) live in the market.

What Is It Good For?

As you can see from the backtesting report, the strategy is too simple to be viable and although it could perform well under ideal conditions of trending market, it cannot perform well under the real conditions of the FX market affected by ranging and choppy periods. It isn't a good 如何在Metatrader 4 (MT4)中设置抛物线转向指标(SAR) idea to use this strategy alone however it could be useful for integration 如何在Metatrader 4 (MT4)中设置抛物线转向指标(SAR) with better signals from other indicators or price action.

This expert advisor is free to download and you can use its .mq4 source file to develop your own EA's.

Download MT4 PSAR Expert Advisor

  1. Download the expert advisor .mq4 file.
  2. Open the MetaTrader 4 data folder (via File→Open Data Folder).
  3. Open the MQL4 Folder.
  4. Copy the .mq4 file to MQL4/Experts/ subfolder.如何在Metatrader 4 (MT4)中设置抛物线转向指标(SAR) 如何在Metatrader 4 (MT4)中设置抛物线转向指标(SAR)
  5. Restart MetaTrader 4 or refresh the expert advisors list by right-clicking the Navigator subwindow of the platform and choosing Refresh.

If you are interested in building your own expert advisor or knowing more about how to do it, 如何在Metatrader 4 (MT4)中设置抛物线转向指标(SAR) check our MT4 Expert Advisor Template.

You can open a trading account with any of the MT4 Forex brokers to freely use the presented here expert advisor for MetaTrader 4.

如何在Metatrader 4 (MT4)中添加模版

Запишитесь на этот курс сейчас, чтобы сохранить свой прогресс, проверить свои знания и смотреть видео без прерываний.

Tradimo operates only under the following URLs: tradimo.com, learn.tradimo.com, de.tradimo.com, go.tradimo.com, news.tradimo.com. All other URLs containing 'tradimo' do not belong to Tradimo and might be fraudulent websites.

Предупреждение о рисках: Торговля финансовыми инструментами несёт в себе высокий уровень риска для вашего капитала с возможностью потерять сумму, превышающую ваши первоначальные инвестиции. Торговля финансовыми инструментами может не подходить для всех инвесторов и предназначена только для лиц старше 18. Пожалуйста, убедитесь, что вы полностью осознаёте риски и, при необходимости, обратитесь за финансовым советом. Образовательный контент на 如何在Metatrader 4 (MT4)中设置抛物线转向指标(SAR) Tradimo представлен только в образовательных целях и не содержит в себе финансовых советов.