PROTECTED SOURCE SCRIPT
Telah dikemas kini

MTS

110
📊 MTS (Murrey Math System) Trading Strategy for TradingView 📊
Introduction:
This script implements the Murrey Math System (MTS), a market analysis tool based on a set of pivot points and price ranges, designed to help traders identify key levels of support and resistance.

MTS calculates key price levels based on historical price swings and helps identify price targets, stop-loss levels, and potential breakout zones.

The strategy also includes an adaptive bias panel, showing buy or sell suggestions based on current price action relative to Murrey Math levels.

Key Components:
1. Pivot Calculation and Conditions:
Pivot Lookback & Spikeyness Index:

The pivots: lookback/forward input defines how far back (and forward) the script looks to identify potential pivot points (high and low). A smaller value focuses on more recent swings, while larger values consider a broader range.

The Spikeyness Index (atrMult) allows you to adjust sensitivity to market spikes, utilizing the Average True Range (ATR) to detect sharp price movements that could indicate potential turning points.

Pivot Conditions:

isPivHigh and isPivLow detect local high and low pivot points, respectively.

Spiky Conditions: The spikyH and spikyL conditions filter out pivots that do not meet the spikiness criteria, which is based on ATR and moving averages.

2. Swing High and Swing Low Identification:
The script identifies and stores previous swing highs (HR_prev) and lows (LR_prev), updating them based on the current market structure.

3. Proprietary Calculation:
The propCalc input enables a proprietary calculation method for determining higher or lower levels beyond the typical Murrey Math levels, offering a more adaptive approach to price targets and support/resistance levels.

4. Murrey Math Lines (MML):

MML Calculation:

The code calculates a set of Murrey Math Lines (EightEight, FourEight, ZeroEight), which are key price levels based on the range of the price over a given time period. These levels represent major support and resistance zones, with the EightEight line indicating extremely overbought conditions and ZeroEight signaling deeply oversold conditions.

Level and Extension Lines:

The script also plots additional levels and extensions based on the range between HR and LR, representing key support/resistance levels. These levels are dynamically drawn on the chart, offering clear insights into where price might reverse or break out.

Strategy Logic:
- Breakout and Breakdown:
The Bias Box panel dynamically displays a trade bias, either suggesting to "Buy on Dip" or "Sell on Rise," depending on whether the current price is above or below the midpoint of the Murrey Math range (BEP). This bias is calculated using the market's relationship to the Murrey Math Levels.

- Buy on Dip: When the price is below the midpoint (BEP), suggesting the market is in a buying zone.

- Sell on Rise: When the price is above the midpoint, suggesting the market is in a selling zone.

- Stop-Loss and Target Hints:

The stop-loss (SL) and target levels are dynamically set based on the position relative to HR and LR:

For Buy on Dip: SL is set at LR Low, Target is set at HR High.

For sell on Rise: SL is set at HR Low, Target is set at LR High.

2. Historical and Current Levels:
The script compares the most recent Murrey Math levels with historical levels. This helps identify any shifts or changes in the market structure, enhancing the trader's ability to adapt to new trends.

- Current Levels:

The current levels are drawn from the most recent HR and LR values, with corresponding extensions showing possible breakout or breakdown zones.

- Historical Levels:

Historical levels are drawn in a "ghost" style, helping traders visualize past market conditions and potential support/resistance zones that could still influence price movement.

- Trade Examples:
Example 1: Buy on Dip
a. Scenario:

Price is below the midpoint (BEP), and the bias suggests a buy on dip.

The trader looks for a rebound from the LR Low level, with a target at the HR High.

b. Entry:

Buy when the price reaches the LR Low level.

c. Exit:

Take profit when the price hits the HR High.

d. Stop-Loss:

Place stop-loss at the LR Low.

Example 2: Sell on Rise
a. Scenario:

Price is above the midpoint (BEP), and the bias suggests a sell on rise.

The trader looks for a pullback to the HR Low, with a target at the LR High.

b. Entry:

Sell when the price reaches the HR High level.

c. Exit:

Take profit when the price hits the LR Low.

d. Stop-Loss:

Place stop-loss at the HR Low.

Key Features:
Bias Panel: A table in the top-right corner showing the current market bias (Buy on Dip, Sell on Rise, or Neutral).

Displays real-time trade direction and risk information, such as stop-loss and target hints.

Dynamic Level Adjustment: As the price moves, the script dynamically updates the key levels (HR, LR, and Murrey Math lines), keeping traders aware of the most recent market structure.

Visualization Tools:

The chart is populated with a series of lines and labels that indicate the critical price levels for trading.

Support/Resistance Lines: Each key level is marked with different colors for quick recognition.

Extensions: Additional lines are plotted based on price projections, indicating where the market could potentially move.

Note:
Please note that this is an educational purpose idea, any action/trade taken will be user's own responsibility.

Enjoy!

Regards.
Nota Keluaran
//Fixed small Bias box condition typo

Penafian

Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.