malaka
New member
Hi,
I am backtesting a TMO strategy in thinkorswim. The strategy has Buy and Sell orders:
- AddOrder(OrderType.BUY_TO_OPEN, main crosses above signal, open[-1], tickcolor=color.orange, arrowColor=color.orange, name="TMO Buy");
- AddOrder(OrderType.SELL_TO_CLOSE, main crosses below signal , open[-1], tickcolor=color.orange, arrowColor=color.orange, name="TMO BClose");
- AddOrder(OrderType.SELL_TO_OPEN, main crosses below signal, open[-1], tickcolor=color.orange, arrowColor=color.orange, name="TMO Sell");
- AddOrder(OrderType.BUY_TO_CLOSE, main crosses above signal , open[-1], tickcolor=color.orange, arrowColor=color.orange, name="TMO SClose");
My question is: is it possible to substitute those Buy and Sell orders, with a Put Credit Spread, specifying also the deltas of both legs?
Also, adding a TP and SL percentage would be the next best thing.
I'll also be happy to be forwarded to some documentation explaining how to do that.
Attached the strategy which I found in this very website.
Thank you
Hi,
when backtesting a strategy in TOS, is it possible, instead of the AddOrder(OrderType.BUY_TO_OPEN, to use a Vertical Credit Spread, for instance.
So, instead of buying the stock, you buy an option, and then you backtest that strategy.
Thank you
I am backtesting a TMO strategy in thinkorswim. The strategy has Buy and Sell orders:
- AddOrder(OrderType.BUY_TO_OPEN, main crosses above signal, open[-1], tickcolor=color.orange, arrowColor=color.orange, name="TMO Buy");
- AddOrder(OrderType.SELL_TO_CLOSE, main crosses below signal , open[-1], tickcolor=color.orange, arrowColor=color.orange, name="TMO BClose");
- AddOrder(OrderType.SELL_TO_OPEN, main crosses below signal, open[-1], tickcolor=color.orange, arrowColor=color.orange, name="TMO Sell");
- AddOrder(OrderType.BUY_TO_CLOSE, main crosses above signal , open[-1], tickcolor=color.orange, arrowColor=color.orange, name="TMO SClose");
My question is: is it possible to substitute those Buy and Sell orders, with a Put Credit Spread, specifying also the deltas of both legs?
Also, adding a TP and SL percentage would be the next best thing.
I'll also be happy to be forwarded to some documentation explaining how to do that.
Attached the strategy which I found in this very website.
Thank you
Hi,
when backtesting a strategy in TOS, is it possible, instead of the AddOrder(OrderType.BUY_TO_OPEN, to use a Vertical Credit Spread, for instance.
So, instead of buying the stock, you buy an option, and then you backtest that strategy.
Thank you
Attachments
Last edited by a moderator: