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

Skrip open-source

Dengan semangat TradingView yang sesungguhnya, penulis skrip ini telah menerbitkannya sebagai sumber terbuka, sehingga para trader dapat memahami dan memverifikasinya. Hormat untuk penulisnya! Anda dapat menggunakannya secara gratis, namun penggunaan kembali kode ini dalam publikasi diatur oleh Tata Tertib. Anda dapat memfavoritkannya untuk digunakan pada chart

Inggin menggunakan skrip ini pada chart?


Juga di:

Pernyataan Penyangkalan