jshingler / TOS-and-Thinkscript-Snippet-Collection

https://jshingler.github.io/TOS-and-Thinkscript-Snippet-Collection/TOS%20&%20Thinkscript%20Collection.html
241 stars 95 forks source link

How to check if is there an order open return 1 else return 0 in thinkorswom coding? #3

Open myfuture2025 opened 5 years ago

myfuture2025 commented 5 years ago

Hi All, I am trying to implement a strategy of back testing in thinkorswim. I want to check if there is no or only 1 order open the strategy will open one more order. How can I do this by coding? Thanks

korygill commented 5 years ago

Have you looked at GetQuantity API? For back testing, I use FloatingPL study, and if you want to contain max position size, see Studies | Edit Studies and Strategies | Global Strategy Settings... | Position Limits.

myfuture2025 commented 5 years ago

Thanks Korygill. I am at work right now; will try it tonight. Thank you