I'm trying to write a program using the Sterling Trader Pro API to automatically cut an open position if it reaches some MAX_LOSS value. Curious if anyone here has already done that and doesn't mind sharing their code? I'd greatly appreciate it!
I tried this in the API when I was trading multiple positions, but there would be too much lag. I found that just keeping an eye on it is the best way to do it.
I can share it, but it is in Tradelink/C#, not in Sterling API code. Unfortunately Tradelink is no longer supported, and I now only use it to set intraday limit and stop orders.