Backtesting in Pine Script often gives idealized results, but real trading involves financing costs like SWAP charges and the impact of leverage. Ignoring these can lead to a misleading strategy performance.
✅ Use-case:
Forex swing trading
Overnight Index strategies
Leveraged day-trading
📌 Key Features:
Adjustable leverage (e.g., 5x, 10x)
Customizable SWAP cost (as % or fixed amount)
P&L adjusted after each trade entry/exit
Performance metrics reflect net of financing costs
💬 Question for the community:
How to integrate SWAP charges and Leverage (for Forex trading) into Pine Script to backtest a strategy? Have you found a more precise or automated method (perhaps broker feed integration)?
Let's improve Pine-based backtesting together.
Drop your ideas, techniques, or improvements below. 👇
✅ Use-case:
Forex swing trading
Overnight Index strategies
Leveraged day-trading
📌 Key Features:
Adjustable leverage (e.g., 5x, 10x)
Customizable SWAP cost (as % or fixed amount)
P&L adjusted after each trade entry/exit
Performance metrics reflect net of financing costs
💬 Question for the community:
How to integrate SWAP charges and Leverage (for Forex trading) into Pine Script to backtest a strategy? Have you found a more precise or automated method (perhaps broker feed integration)?
Let's improve Pine-based backtesting together.
Drop your ideas, techniques, or improvements below. 👇
Отказ от ответственности
Все виды контента, которые вы можете увидеть на TradingView, не являются финансовыми, инвестиционными, торговыми или любыми другими рекомендациями. Мы не предоставляем советы по покупке и продаже активов. Подробнее — в Условиях использования TradingView.
Отказ от ответственности
Все виды контента, которые вы можете увидеть на TradingView, не являются финансовыми, инвестиционными, торговыми или любыми другими рекомендациями. Мы не предоставляем советы по покупке и продаже активов. Подробнее — в Условиях использования TradingView.