top of page

TradingView Strategies

The 'Inputs' Guide

GCODE Intelligence

This parameter controls the depth of analysis for the trading bot. Higher values indicate more thorough analysis.

Screenshot 2024-05-27 at 7.56.43 pm.png
Leverage Settings

Backtesting a TradingView Strategy with leverage can provide more accurate results for several reasons:

  1. Realistic Risk Management Simulation: Many traders use leverage to amplify their positions, which significantly impacts risk management. Backtesting with leverage allows you to simulate the actual risk exposure you would face when trading live.

  2. Assessing Profit Potential: Leveraged positions have the potential to generate higher profits, but they also come with increased risk. Backtesting with leverage enables you to evaluate both the profit potential and the associated risks of your strategy more realistically.

  3. Testing Risk-Adjusted Returns: By incorporating leverage into your backtesting, you can assess the risk-adjusted returns of your strategy. This means evaluating the returns relative to the level of risk taken, which is crucial for determining the strategy's overall effectiveness.


Backtesting with leverage provides a more comprehensive assessment of your trading strategy's performance, allowing you to make better-informed decisions when trading with real money. However, it's essential to use leverage responsibly and understand the associated risks before implementing it in live trading.

Allow Swing Trading

Enabling a TradingView Strategy to switch from a long position to a short position (or vice versa) before a take profit or stop loss is hit is known as allowing the strategy to "swing" positions. Here are the benefits and potential drawbacks of choosing this style of trading:



  1. Flexibility: Swinging positions allows the strategy to adapt to changing market conditions. It provides flexibility to capture opportunities on both sides of the market, whether bullish or bearish trends are prevalent.

  2. Maximising Profits: By swinging positions, the strategy can potentially capture additional gains if the market reverses direction before the initial take profit or stop loss level is reached. This can result in higher overall profitability compared to sticking with a single directional bias.

  3. Reducing Losses: Similarly, swinging positions can help minimise losses if the market moves against the initial position. By quickly switching to the opposite direction, the strategy may avoid larger losses that would occur if waiting for the original stop loss to trigger.

  4. Adaptive to Volatility: Swinging positions allows the strategy to respond to increased volatility or sudden price movements more effectively. It can help prevent being caught on the wrong side of a rapidly changing market.


  1. Increased Complexity: Swinging positions adds complexity to the trading strategy. It requires more sophisticated logic and potentially introduces more parameters to optimise, which could make the strategy harder to understand and manage.

  2. Whipsawing: Rapidly switching between long and short positions in response to short-term price movements can result in frequent whipsawing, where the strategy incurs losses due to false signals or market noise. This can lead to decreased overall performance and increased transaction costs. [Refer to Sensitivity Input and Confirmation Bias]

  3. Overtrading: Swinging positions too frequently may lead to overtrading, where the strategy generates excessive trade signals without providing meaningful gains. This can result in lower profitability and increased stress on the trader.

  4. Slippage and Execution Issues: Swinging positions may result in slippage and execution issues, particularly in fast-moving markets or during periods of low liquidity. This can impact the realised profits and losses compared to the theoretical performance of the strategy.

In summary, while swinging positions in a strategy offers flexibility and potential advantages in capturing market reversals, it also introduces complexities and risks that traders need to carefully consider. It's essential to thoroughly backtest and validate the strategy's performance before deploying it in live trading and to monitor its behaviour closely to mitigate potential drawbacks.

bottom of page