Initiate Variables Feature
You can now initiatize variables to set strikes, instruments or any other variable as per your requirement. The variables are retrieved in the condition builder using the Get Runtime Keyword. Pls check the video below for detailed info using wait and trade example.
Understanding Initialize Variables in Tradetron
This blog explains clearly when Initialize Variables are written, when they are not written, and why they may not appear in Runtime Data.
What Are Initialize Variables?
Initialize Variables are variables that are written automatically by the system when a new run counter starts and a bot is assigned to the strategy.
They are designed to set initial values at the beginning of a run counter.
The most important thing to understand: Initialize Variables are triggered by bot assignment in a new run counter — not by trade execution.
When Exactly Are Initialize Variables Written?
Initialize Variables are written only once per run counter — at the moment the strategy starts running for a new run counter.
Example 1: Strategy Starts After Market Open
- The strategy exited yesterday.
- Deployment status is set to Active after reactivate time is over as per the advance settings.
- The next trading day begins.
Now, whether the strategy starts immediately or later depends on the Advanced Setting:
“Start condition check after exchange open” If this is set to 10 minutes, then:
- The strategy will begin checking conditions 10 minutes after market open.
- At that moment, the bot is assigned.
- Initialize Variables are written at that time.
This happens only once for that run counter.
What If the Strategy Is Active but No Trade Is Taken?
Now consider this situation:
- The strategy becomes Active status.
- Initialize Variables are written when the bot is assigned.
- The entire day passes.
- No trade is triggered.
- The strategy remains Active.
In this case:
- The variables are already written internally. However, they may not appear in the Runtime Data section on the deployment page.
Why?
Runtime Data for the current run counter becomes visible on the front end only after a trade is executed in that run counter.
So even if Initialize Variables are written, they may not reflect in Runtime Data until a trade happens.
This creates confusion, but technically everything is working correctly.
What Happens If the Strategy Remains Active and No Trade Is Taken?
Let’s continue the same scenario:
- The strategy started today and strategy status is active.
- Initialize Variables were written.
- No trade was taken.
- The strategy remains Active.
- The next trading day begins.
Many users assume that Initialize Variables will be written again the next morning, but this is incorrect.
Since:
- The run counter has not changed, and
- The bot was already assigned earlier,
Initialize Variables will not be written again.
They were already written when the bot was first assigned in that run counter.
Common Misconception
This is completely wrong.
Initialize Variables are:
- Not dependent on trade execution.
- Not written daily.
- Not written repeatedly while the strategy remains Active.
They are written only once per run counter.
Key Rules to Remember
- Initialize Variables work only once per run counter.
- They are written only when the bot is assigned for the first time in that run counter.
- It is a one-time variable writing feature.
- Variables are not written continuously.
- They are not written again unless a new run counter is starts.
Updated on: 27/02/2026
Thank you!
