Ok I will try this. I have the buy and sell studies set up to show in a lower panel. It triggered there today like it should. I did the alert after the fact with the sell study and it shows it should have triggered. I have a buy alert setup now.
Thanks for your help
Looking at the monitor page and what should have been a sell 100% to close and then a sell to open, instead turned into two sell to close one being 100% and the next close being the number of shares 100% would have been. Then a sell to open.
The one time I got this to work I used an exact shares number, I'm thinking that it doesn't like the 100% or a dollar amount. I'll keep trying.
What I think is happening is when you use 100% or a dollar amount, thinkorswim figures the number of shares and resubmits the conditional order.
If you are using code to trigger the conditional order the resubmitted order is still true. But when using a study like mine once its triggered its no longer true. Its now looking for the opposite trade. So it doesn't trigger the resubmitted order. Just my best guess.
Today the study called for a buy, but the conditional order or the test alert, did not fire. When I look at the monitor page the conditional order has a blank in the symbol area. Which is strange because the condition order I submitted had the symbol. My condition order should trigger a second order that is just a simple math equation that will always trigger. It does have the symbol. Only the ones that are based on a study are missing the symbol. I'm now editing the submitted conditional orders to add the symbol. Hope it works.
The missing symbol happens when I use a saved 1st trgs seq conditional order. It doesn't happen when I create a new 1st trgs seg conditional order.
Today it should have sold. The study did in a lower panel. But the order did not trigger. No clue why. Hope someone can give me a clue.
I found this, "In Conditional Orders, you can use either a regular study or an expression." , I don't believe my custom study would qualify as a regular study.
I wonder how many people are triggering a conditional order with a study and do complex custom studies work?