There are elegant ways to do this. When I wanted this very thing, I didn't want to put in the work to do it elegantly. So, I brute-forced it like this: def condition = B_width < K_width AND B_width[1] < K_width[1] AND B_width[2] < K_width[2] AND B_width[3] < K_width[3] AND B_width[4] < K_width[4] AND B_width[5] < K_width[5] AND B_width[6] < K_width[6] AND Bby danceswithclouds - Trading Discussion
Hi, Guys, I'm trying to count winning trades in a back-testing system. I want it to show the winning count on-the-fly in chartbubbles. def boughtprice = EntryPrice(); # tracks the entry price of the trade def net = (close - boughtprice); # calculates the running net of a trade def win = Exit_Condition and net > 0; # defines a winning trade def wincount_1 = TotalSum(win);by danceswithclouds - Trading Discussion