Articles on: 3rd Party Integrations

Why Is My TradingView Strategy Going Into a Loop?

If your strategy is continuously firing entry and exit trades without stopping, you are experiencing what is commonly referred to as a loop issue. This guide explains why this happens and how to fix it.

Understanding Why the Loop Happens


A very common misconception among users is that once a TradingView signal is used to trigger a trade, the system will automatically discard that signal. This is not the case.

When Tradetron receives a key-value pair from TradingView, that variable is stored in the system until a Universal Exit is triggered. It does not reset or disappear after the trade is taken. This is the root cause of the loop issue.

A Simple Example


Let's say your entry variable is call_entry and your exit variable is call_exit.

Your entry logic is: Get Runtime (call_entry) == 1

Your exit logic is: Get Runtime (call_exit) == 1


Here is what happens step by step:


  1. TradingView sends call_entry = 1 → Strategy enters the trade ✅
  2. TradingView sends call_exit = 1 → Strategy exits the trade ✅
  3. But now both call_entry = 1 and call_exit = 1 are still stored in the system
  4. The entry condition is still true → Strategy enters again
  5. The exit condition is still true → Strategy exits again
  6. This keeps repeating and causes a continuous loop of entries and exits

How to Fix the Loop Issue


The solution is to use the Runtime Variable feature in Tradetron. This allows you to overwrite a variable's value at the time of entry or exit, so that the old signal does not remain active and trigger the strategy again.

For example, when entry is taken you can overwrite call_entry to 0, so that the entry condition is no longer true after the trade is entered. Similarly, overwrite call_exit to 0 at the time of exit.

👉 To fully understand the Runtime Variable feature and how to implement it, watch this YouTube video series: Runtime Variable Tutorial Series

Other Causes of Loop Issues


The example above is the most common cause of a loop, but there can be other conditions in your strategy that are causing it as well. The best way to identify the exact cause is to read your Notification Logs. The logs will clearly show which conditions are being triggered repeatedly and help you pinpoint the problem.

👉 To learn how to read your Notification Logs, refer to this guide: How to Read Notification Logs



If you have gone through the steps above and are still facing a loop issue, please reach out to our chat support and we will be happy to help you.

Updated on: 27/05/2026

Was this article helpful?

Share your feedback

Cancel

Thank you!