I don't know about finding the code for Trade Station but I did a Google search using the words "market profile trade station" and that showed a number of results for what I think you're looking for.
If those don't work out and you're going to write one yourself then the value area rules are...