How to debug Strategy
There are a number of reasons why a strategy would not take a trade, we will learn about the most common issues/errors that can affect the strategy entry
When you notice that a strategy is not entering or taking a trade, the first thing to do is to check the notification logs
Notification logs are Blank
If the notification logs are blank ie.no logs are generated, that means either the condition is not met or there is some syntax issue
Now, in this case, you will have to check your strategy conditions, if the syntax is correct or not. You can refer to the Keyword Documentation, and check if the keywords are used as per their expected format.
Force Running the strategy
Once you are sure that the syntax is correct, and the conditions are met on the chart but still no trade, you can add a simple time>=915 condition in the entry block and change the logic to OR, now what this does is that since at least the time condition is satisfied and the logic is in OR, the strategy should enter. It is a method of force entering the strategy.
Time condition needs to be kept on top of all the conditions
Once the strategy enters, you can check the notification logs to see if there are any errors in any keywords. If there are no errors, that means the condition was simply not satisfied as per data received by Tradetron. Now even after adding time conditions in OR, if the strategy does not take an entry, that means most likely there is some issue with syntax in one of the conditions, Pls check and verify the same.
API OAUTH TOKEN
One more reason why strategy might not enter is if you have set it to API control by mistake from the “My strategies” page. If the strategy is left to be API controlled, it will not trade unless it receives an external signal.
If this is the case, you can click on the API OAUTH TOKEN option under the 3 dots in the “My Strategies” page and unlink the strategy and redeploy.
Pls check the images below for reference
Notification logs are Visible
Let's move to a case, where notification logs are visible, where you can see the entry condition being logged multiple times. This means there is some issue with your position builder because of which it is not allowing entry
Common errors in Position builder
Using QTY as 1 instead of Lots as 1, when trading FnO
Improper keyword usage in strike FX
No strike from option chain available based on Find Strike parameters
Not selecting underlying in Expiry FX
Pls check the Position builder for the above mistakes/errors and rectify it and update the strategy. Now the strategy should take entry properly.
If the above methods don't work for you, pls connect with chat support or email email@example.com
How to verify the output of the conditions
There can be some cases where the trade is taken but it seems that the trade is incorrect or not as per the chart you are following. In that case, checking and understanding the notification logs really comes in handy.
In the below example, we will check the conditions in the condition builder and their corresponding output from the notification logs
The above is the strategy entry conditions and the image below represents the notification logs at the time of entry
As visible from the notification logs above, you can see the output values of each keyword from the entry conditions and their respective values highlighted. You can compare these keywords values with the chart and then you will get an idea why the trade was taken. This is the easiest way to debug and to check the strategy is working as expected
You can always connect with chat support or email firstname.lastname@example.org in case of any queries
Updated on: 10/11/2022