StrategyDesk’s programming language supports multiple timeframes nicely and the function library is pretty good.. All of StrategyDesk’s indicators are supported by NT, so rewriting the Boolean logic with NT functions is not a problem.
I looked at the NT examples for multiple timeframes for setting up Add(PeriodType) object data series for each timeframe and using IF( BarsInProgress = x) and the IF (entry/exit Boolean logic) statements for each timeframe in C#.. Pretty simple but I’m not too sure how to make this work in my case..
Here’s an example of my entry condition’s Boolean logic complexity (in pseudocode)… My entry logic is about 100 lines while the exit is about 75 lines.
( ( TAIndicator1[Close,D,0,$COMPX] < TAIndicator[Close,D,1,$COMPX] AND TAIndicator1[Close,D,0,$COMPX] <= 0 AND TAIndicator1[Close,D,0,$COMPX] > 0 ) OR TAIndicator1[Close,D,0,$COMPX] <= 0 ) AND ( ( ( TAIndicator2[Close,D,0,$COMPX] >= TAIndicator2[Close,D,5,$COMPX] OR TAIndicator2[Close,D,0,$COMPX] >= TAIndicator2[Close,D,1,$COMPX] ) AND TAIndicator2[Close,60,1,$COMPX] >= 80 ) OR ( TAIndicator3[Close,D,0,$COMPX] < TAIndicator3[Close,D,1,$COMPX] AND TAIndicator3[Close,D,0,$COMPX] < TAIndicator3[Close,D,5,$COMPX] AND TAIndicator3[Close,60,1,$COMPX] >= 80 AND TAIndicator3[Close,5,1,$COMPX] >= TAIndicator3[Close,5,1,$COMPX] ) ) AND ( ( TAIndicator4[Close,5,1,$COMPX] >= 80 AND TAIndicator4[Close,5,1,$COMPX] >= 80 AND ( ( TAIndicator5[Close,D,0,$COMPX] >= 0 AND TAIndicator5[Close,5,1,$COMPX] >= 80 AND ( ( TAIndicator6[Close,5,2,$COMPX] <= 0 ) OR ( TAIndicator6[Close,5,1,$COMPX] >= 80 ) ) ) OR ( TAIndicator7[Close,D,0,$COMPX] < 0 AND TAIndicator7[Close,5,1,$COMPX] >= 80 AND ( ( TAIndicator7[Close,5,3,$COMPX] <= 0 ) OR ( TAIndicator7[Close,5,1,$COMPX] >= 80 ) ) ) ) ) OR . . . ..... 50 more lines of similar boolean logic buy strategy .....
I’m just looking for an approach and maybe some pseudocode. Thanks
Comment