Plot buy and sell order during current bar


Category:
0
0

Hello Pete,

I am backtesting a strategy using ThinkorSwim. The strategy is such that when a condition is satisfied at the open of the current bar (period), a buy order is placed at the same time. When the strategy is inspected visually, the graph shows the order was placed at the open price of the current bar but the buy arrow is pointing to the open of the next bar. The strategy report also shows the same.

Is it possible to make it this such that the order is executed at the open of the current bar?

Thank you in advance.

RESOLVED
Marked as spam
Posted by (Questions: 2, Answers: 2)
Asked on June 18, 2020 12:22 pm
172 views
0
Private answer

I updated the title of your question because from your description you are working with theoretical orders plotted from a Chart Strategy. Conditional Orders are an entirely separate matter.

You did not provide any code so we have nothing to do here. There is no blanket solution and each case must be evaluated on its own. I suggest you read the following post to understand how to get the strategy orders to plot on the candle that is appropriate for the signal you have created.

https://www.hahn-tech.com/ans/parablic-sar-signal-not-firing-in-tos-strategy/

Be very careful here because Thinkorswim does not have any safeguards that prevent users from building chart strategies that cannot be traded in live market. For example Thinkorswim will allow you to post a buy order at the open even if the signal itself is not valid until that candle closes.

Marked as spam
Posted by (Questions: 37, Answers: 4118)
Answered on June 18, 2020 2:44 pm
0
Thanks for your help and guidance!
( at June 21, 2020 6:12 pm)