- Introduction and how it is different The PresentTrend strategy is a unique custom trend-following strategy. This combination allows the strategy to take advantage of both short-term and long-term market trends, making it suitable for various market conditions.
- Strategy, How it Works RSI or MFI: The first part uses a custom indicator based on either the Relative Strength Index (RSI) or the Money Flow Index (MFI). The indicator calculates a PresentTrend value, which generates buy and sell signals based on its crossover and crossunder, indicating potential trend reversals.
ATR: The second part is a popular trend-following indicator that uses the Average True Range (ATR).
The strategy enters a long position when all buy signals from both strategies are true, and a short position when all sell signals are true. This ensures trades are entered when both short-term and long-term trends align, potentially increasing the strategy's reliability.
- Trade direction The strategy also includes a trade direction parameter, allowing the user to choose whether to enter long trades, short trades, or both. This makes the strategy adaptable to different market conditions and trading styles.
- Usage 1. Set the input parameters for the custom trend-following strategy. 2. Choose whether to use the RSI or MFI for the custom strategy. 3. Choose the trade direction: long, short, or both. 4. The strategy will generate buy and sell signals based on the conditions of both strategies. 5. Enter a trade when a buy or sell signal is generated, depending on the chosen trade direction.
Please note that this strategy is meant to be a tool to aid in your trading decisions and not a standalone trading system. Always use proper risk management and make sure to test the strategy thoroughly before using it in live trading.
- Default settings 1. Source: 'hlc3', a balanced price level for calculations. 2. Length: 14, a common setting for many technical indicators. 3. Multiplier: 1.618 (the golden ratio), used in calculating the upper and lower thresholds. 4. RSI or MFI: Set to use MFI by default, both are momentum indicators. 5. Trade Direction: 'Both', allowing for both long and short trades.
The default settings are designed to provide a balanced approach to trend detection. However, these can be adjusted based on the user's preferences and the specific characteristics of the market being traded.
- Strategy's default Properties 1. Default Quantity Type: 'strategy.percent_of_equity' 2. commission_value= 0.1, commission_type=strategy.commission.percent, slippage= 1: These parameters set the commission and slippage for the strategy. The commission is set to 0.1% of the trade value, and the slippage (the difference between the expected price of a trade and the price at which the trade is executed) is set to 1. 3. default_qty_type = strategy.percent_of_equity, default_qty_value = 10: These parameters set the default quantity for trades. The default_qty_type is set to strategy.percent_of_equity, which means that the size of each trade will be a percentage of the account equity. The default_qty_value is set to 10, which means that each trade will be 10% of the account equity. 4. initial_capital= 10000: This parameter sets the initial capital for the strategy to $10,000.
진정한 TradingView 정신에 따라, 이 스크립트의 저자는 트레이더들이 이해하고 검증할 수 있도록 오픈 소스로 공개했습니다. 저자에게 박수를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 출판물에서 이 코드를 재사용하는 것은 하우스 룰에 의해 관리됩니다. 님은 즐겨찾기로 이 스크립트를 차트에서 쓸 수 있습니다.