Some background here, I've spent about sixteen hours writing logic for a watchlist for what I describe as the full lifecycle of price movement made of eleven phases.
For example: A setup goes from bullish, to bullish pullback, to bearish, to bearish pullback.
The definition for each phase (II Pullback for example) is made up of conditional groupings which include what I describe as the makeup for that distinct sub-phase (such as Pullback type1, pullback type2, pullback type 3).
Each subphase: (II. Pullback Type 1) is made up of conditional operation checks which define that subphase:
Pullback Type1: (A>B) and (C>F) and (R>S) and (S<L) and (Q>1) and (W>3);
Pullback Type2: ....
Pullback Type3: ....
Pullback Type4: ....
.....
The operational checks (for each subphase) are from six to ten definitions long. For example: pullback type1 above is six operation checks long.
When inputting about 65% of the logic, I received this error:
"com.devexperts.tos.thinkscript.runtime.TooComplexException: The complexity of the expression suggests that it may not be reliable with real-time data."
The issue appears that as I add the remaining four phases, I have reached a limitation. I have considered separating the bullish from the bearish phases. This will make two logic instances of half the size.
I am not a programmer, but worked as a business analyst, so I am familiar with technical concepts. However, I am not familiar with optimization techniques.
My question is: What can I do to optimize the code to be able to accommodate the remaining 40% of the logic in one definition set?
Any thoughts overcoming the conditional limits placed on TOS processing?
For example: A setup goes from bullish, to bullish pullback, to bearish, to bearish pullback.
The definition for each phase (II Pullback for example) is made up of conditional groupings which include what I describe as the makeup for that distinct sub-phase (such as Pullback type1, pullback type2, pullback type 3).
Each subphase: (II. Pullback Type 1) is made up of conditional operation checks which define that subphase:
Pullback Type1: (A>B) and (C>F) and (R>S) and (S<L) and (Q>1) and (W>3);
Pullback Type2: ....
Pullback Type3: ....
Pullback Type4: ....
.....
The operational checks (for each subphase) are from six to ten definitions long. For example: pullback type1 above is six operation checks long.
When inputting about 65% of the logic, I received this error:
"com.devexperts.tos.thinkscript.runtime.TooComplexException: The complexity of the expression suggests that it may not be reliable with real-time data."
The issue appears that as I add the remaining four phases, I have reached a limitation. I have considered separating the bullish from the bearish phases. This will make two logic instances of half the size.
I am not a programmer, but worked as a business analyst, so I am familiar with technical concepts. However, I am not familiar with optimization techniques.
My question is: What can I do to optimize the code to be able to accommodate the remaining 40% of the logic in one definition set?
Any thoughts overcoming the conditional limits placed on TOS processing?
Last edited: