OPEN-SOURCE SCRIPT

TFM

TFM Strategy Explanation

Overview

The TFM (Timeframe Multiplier) strategy is a PineScript trading bot that utilizes multiple timeframes to identify entry and exit points.

Inputs

1. tfm (Timeframe Multiplier): Multiplies the chart's timeframe to create a higher timeframe for analysis.
2. lns (Long and Short): Enables or disables short positions.

Logic

Calculations

1. chartTf: Gets the chart's timeframe in seconds.
2. tfTimes: Calculates the higher timeframe by multiplying chartTf with tfm.
3. MintickerClose and MaxtickerClose: Retrieve the minimum and maximum closing prices from the higher timeframe using request.security.
- MintickerClose: Finds the lowest low when the higher timeframe's close is below its open.
- MaxtickerClose: Finds the highest high when the higher timeframe's close is above its open.

Entries and Exits

1. Long Entry: When the current close price crosses above MaxtickerClose.
2. Short Entry (if lns is true): When the current close price crosses below MintickerClose.
3. Exit Long: When the short condition is met (if lns is false) or when the trade is manually closed.

Strategy

1. Attach the script to a chart.
2. Adjust tfm and lns inputs.
3. Monitor entries and exits.

Example Use Cases

1. Intraday trading with tfm = 2-5.
2. Swing trading with tfm = 10-30.

Tips

1. Experiment with different tfm values.
2. Use lns to control short positions.
3. Combine with other indicators for confirmation.
Candlestick analysisChart patternsmultitimeframe

開源腳本

在真正的TradingView精神中,這個腳本的作者以開源的方式發佈,這樣交易員可以理解和驗證它。請向作者致敬!您可以免費使用它,但在出版物中再次使用這段程式碼將受到網站規則的約束。 您可以收藏它以在圖表上使用。

想在圖表上使用此腳本?


更多:

免責聲明