OPEN-SOURCE SCRIPT

IU Multiple Trailing Stop Loss Methods

アップデート済
The 'IU Multiplier Trailing SL' its risk management tool which allows users to apply multiple trailing stop-loss (SL) methods for risk management of their trades. Below is a detailed explanation of each input and the working of the Script.

Main Inputs:
- bar_time: Specifies the date from which the strategy begins.
- entry_type: Choose between 'Long' or 'Short' positions.
- trailing_method: Select the trailing stop-loss method. Options include ATR, Parabolic SAR, Supertrend, Point/Pip based, Percentage, EMA, Highest/Lowest, Standard Deviation, and multiple target-based methods.
- exit_after_close: If checked, exits the trade only after the candle closes.

Optional Inputs:
ATR Settings:
- atr_Length: Length for the ATR calculation.
- atr_factor: ATR multiplier for SL calculation.

Parabolic SAR Settings:
- start, increment, maximum: Parameters for the Parabolic SAR indicator.

Supertrend Settings:
- supertrend_Length, supertrend_factor: Length and factor for the Supertrend indicator.

Point/Pip Based:
- point_base: Set trailing SL in points/pips.

Percentage Based:
- percentage_base: Set SL as a percentage of entry price.

EMA Settings:
- ema_Length: Length for EMA calculation.

Standard Deviation Settings:
- std_Length, std_factor: Length and factor for standard deviation calculation.

Highest/Lowest Settings:
- highest_lowest_Length: Length for the highest/lowest SL calculation.

Target-Based Inputs:
- ATR, Point, Percentage, and Standard Deviation based target SL settings with customizable lengths and multipliers.

Entry Logic:
- Trades initiate based on the entry_type selected and the specified bar_time.
- If Long is selected, a long trade is initiated when the conditions match, and vice versa for Short.

Trailing Stop-Loss (SL) Methods Explained:
The strategy dynamically adjusts stop-loss based on the chosen method. Each method has its calculation logic:

- ATR: Stop-loss calculated using ATR multiplied by a user-defined factor.
- Parabolic SAR: Uses the Parabolic SAR indicator for trailing stop-loss.
- Supertrend: Utilizes the Supertrend indicator as the stop-loss line.
- Point/Pip Based: Fixed point-based stop-loss.
- Percentage Based: SL set as a percentage of entry price.
- EMA: SL based on the Exponential Moving Average.
- Highest/Lowest: Uses the highest high or lowest low over a specified period.
- Standard Deviation: SL calculated using standard deviation.

Exit Conditions:
- If exit_after_close is enabled, the position will only close after the candle confirms the stop-loss hit.
- If exit_after_close is disabled, the strategy will close the trade immediately when the SL is breached.

Visualization:
The script plots the chosen trailing stop-loss method on the chart for easy visualization.

Target-Based Trailing SL Logic:
- When a position is opened, the strategy calculates the initial stop-loss and progressively adjusts it as the price moves favorably.
- Each SL adjustment is stored in an array for accurate tracking and visualization.

Alerts and Labels:
- When the trailing stop loss is hit this scripts draws a label and give alert to the user that trailing stop has been hit for the trade.
Summary:
This script offers flexible trailing stop-loss options for traders who want dynamic risk management in their strategies. By offering multiple methods like ATR, SAR, Supertrend, and EMA, it caters to various trading styles and risk preferences.
リリースノート
The 'IU Multiplier Trailing SL' its risk management tool which allows users to apply multiple trailing stop-loss (SL) methods for risk management of their trades. Below is a detailed explanation of each input and the working of the Script.

Main Inputs:
- bar_time: Specifies the date from which the strategy begins.
- entry_type: Choose between 'Long' or 'Short' positions.
- trailing_method: Select the trailing stop-loss method. Options include ATR, Parabolic SAR, Supertrend, Point/Pip based, Percentage, EMA, Highest/Lowest, Standard Deviation, and multiple target-based methods.
- exit_after_close: If checked, exits the trade only after the candle closes.

Optional Inputs:
ATR Settings:
- atr_Length: Length for the ATR calculation.
- atr_factor: ATR multiplier for SL calculation.

Parabolic SAR Settings:
- start, increment, maximum: Parameters for the Parabolic SAR indicator.

Supertrend Settings:
- supertrend_Length, supertrend_factor: Length and factor for the Supertrend indicator.

Point/Pip Based:
- point_base: Set trailing SL in points/pips.

Percentage Based:
- percentage_base: Set SL as a percentage of entry price.

EMA Settings:
- ema_Length: Length for EMA calculation.

Standard Deviation Settings:
- std_Length, std_factor: Length and factor for standard deviation calculation.

Highest/Lowest Settings:
- highest_lowest_Length: Length for the highest/lowest SL calculation.

Target-Based Inputs:
- ATR, Point, Percentage, and Standard Deviation based target SL settings with customizable lengths and multipliers.

Entry Logic:
- Trades initiate based on the entry_type selected and the specified bar_time.
- If Long is selected, a long trade is initiated when the conditions match, and vice versa for Short.

Trailing Stop-Loss (SL) Methods Explained:
The strategy dynamically adjusts stop-loss based on the chosen method. Each method has its calculation logic:

- ATR: Stop-loss calculated using ATR multiplied by a user-defined factor.
- Parabolic SAR: Uses the Parabolic SAR indicator for trailing stop-loss.
- Supertrend: Utilizes the Supertrend indicator as the stop-loss line.
- Point/Pip Based: Fixed point-based stop-loss.
- Percentage Based: SL set as a percentage of entry price.
- EMA: SL based on the Exponential Moving Average.
- Highest/Lowest: Uses the highest high or lowest low over a specified period.
- Standard Deviation: SL calculated using standard deviation.

Exit Conditions:
- If exit_after_close is enabled, the position will only close after the candle confirms the stop-loss hit.
- If exit_after_close is disabled, the strategy will close the trade immediately when the SL is breached.

Visualization:
The script plots the chosen trailing stop-loss method on the chart for easy visualization.

Target-Based Trailing SL Logic:
- When a position is opened, the strategy calculates the initial stop-loss and progressively adjusts it as the price moves favorably.
- Each SL adjustment is stored in an array for accurate tracking and visualization.

Alerts and Labels:
- When the trailing stop loss is hit this scripts draws a label and give alert to the user that trailing stop has been hit for the trade.
Summary:
This script offers flexible trailing stop-loss options for traders who want dynamic risk management in their strategies. By offering multiple methods like ATR, SAR, Supertrend, and EMA, it caters to various trading styles and risk preferences.
educationalMoving AveragesVolatility

オープンソーススクリプト

TradingViewの精神に則り、このスクリプトの作者は、トレーダーが理解し検証できるようにオープンソースで公開しています。作者に敬意を表します!無料で使用することができますが、このコードを投稿で再利用するには、ハウスルールに準拠する必要があります。 お気に入りに登録してチャート上でご利用頂けます。

チャートでこのスクリプトを利用したいですか?


他のメディア:

免責事項