Buy option contract when underlying trades below specified price


Category:
0
0

Plz help: To create conditional order upon the break of support/resistance level.

I would like to execute a conditional order on TOS. I want to use 3 Min Candle and want to buy a 355 CALL option of XYZ(say it is trading pre-market at 343) when 3 Mins candle “CLOSE” is greater than or equal to 350 Resistance price of XYZ.

And second, a new order is to BUY PUT(3 Mins Candle): When XYZ stock price break support area of 343 breaks. Buy PUT when 3 Mins candle CLOSE price is at or below 343.

Marked as spam
Posted by (Questions: 1, Answers: 2)
Asked on May 13, 2020 6:26 am
191 views
0
Private answer

The question title you entered was missing the details required to help folks understand the context of your request: "How to create conditional order on ThinkorSwim"

There are dozens of posts in the forum that explain how to create conditional orders and we have a video that explains everything. So that question title does not mean anything at all. The title of the question has been updated to explain the context of your request, which enables the rest of our viewers to search for an find this specific solution.

There is no stock ticker "XYZ". We need a specific example and not a theoretical one.

There is absolutely no code required for this. Everything is within reach of anyone that knows how to use a mouse or trackpad.

The following screenshot demonstrates each step required to setup a conditional order to buy one .AAPL200619C315 contract when the price of the underlying "AAPL" Mark price is less than or equal to 310.00.

Notice there is no time frame to select in this example because none is required. Price trading above or below a specific value requires no specific time frame.

Attachments:
Marked as spam
Posted by (Questions: 37, Answers: 4084)
Answered on May 13, 2020 7:33 am
0
Thank you so much Hahns for taking your time. But On the above example, I would like to buy a 315 Call Only if 3 Mins candle is formed and close of 3 Mins candle is above 310.
( at May 13, 2020 3:22 pm)
0
So are you talking about the entire 3 min candle being above 310? Not just the close of the candle but the first 3 min candle to close with the low above 310?
( at May 13, 2020 3:40 pm)
0
yes, I do.
( at May 14, 2020 6:37 am)
0
Private answer

In the comments section of the original answer I provided I discovered the request is specifically for a 3 min bar to completely close above the key level. So that means all four data points of the candle, (open, high, low and close).

We only need to use one data point for this, the low. So we build a signal that checks if the former candle has a low below the key level and the current candle has a low that is above the key level. (for the opposite side of this request we use the high of the candle, reverse the signs and change the value of the key level).

def pattern = low[1] < 310.0 and low > 310.0;

Now we can't use that directly, because we need to wait for that bar to close. So we add a second line that checks if that pattern was true on the previous bar. Here are both lines together:

def pattern = low[1] < 310.0 and low > 310.0;
plot trigger = pattern[1];

We could have done that all in one line but this makes it more clear exactly what the code is doing. So you create an order to buy the specific option contract your setup requires, then access the code editor for the conditional order and insert this code.

I have included a new screenshot below that shows all the elements required to put this together. Drawings indicate those fields that required user input to create and set the various elements.

For those that are looking at this screenshot and feel completely lost. No worries. I explain how to use this tool step-by-step using several examples in the following video:

https://www.hahn-tech.com/thinkorswim-autotrade-almost/

Note the title of the question requests a method to buy when the underlying trades below a specified price while in the body of the question the request is for both. So here I am showing how to trigger the order when the underlying closes above the key level. You can flip things around to perform the opposite side of this request.

Marked as spam
Posted by (Questions: 37, Answers: 4084)
Answered on May 14, 2020 8:15 am