Help With Conditional Order on Thinkorswim

Hi Pete,

I watched your tutorial on how to do semi-auto orders on tos yesterday.

  1. I have a custom studies, which I want to place my conditional order based. But when I followed the step and put below script into New Studies, it just says “expected doubles” error message. Can you help me fix it?

input price = close;
input length = 20;
input deviation = .25;
def sDev = StDev(data = price, length = length);
plot MidLine = Average(data = price, length = length);
plot LBB = MidLine + deviation * -sDev;
plot UBB = MidLine + deviation * sDev;

2. Also, I realized there is tos doesn’t support conditional orders based on ATR trailing stop, but it supports some custom studies. Is there any ways to find a similar study?

Thanks a lot for your help!



Editor’s note: The title and URL of this post has been adjusted to correct a spelling error.