♥ 0 |
Backtesting a strategy. Entry indicators (arrows up/down) are correct timing for entries based on desired conditions. When backtesting using AddOrder to buy (what I desired to buy is when the actual condition occurs) the entry and exits are one candle after the indicated entry. Buy entry & Sell exits set to “close.” I’ve also tried “open” and “close[1]” with the same results. Entering and exiting a full 1 candle after the entry & exit conditions actually occur. As I’m new to backtesting, is there anyway to resolve this and get the actual order entry/exit times & prices to occur at the same time as when the indicated conditions occur (such as an EMA crossover), or is this an insurmountable issue of backtesting? addOrder(OrderType.BUY_TO_OPEN, buy, close, 2000 / close, tickColor = color.green, arrowColor = color.green, name = “BUY CALL TFPB”);
Marked as spam
|
Private answer
This is a pretty common issue and we have already provided a very detailed solution in a previous post in this forum. Before getting into that I wanted to explain that I changed the title of the question before approving it. The new title I selected should make it much easier for others to locate this solution using the search function. I also moved this question out of the "Chart Studies" topic and into the "Strategy Guide" topic (which is where questions about chart strategies are found). The following post will explain exactly how to achieve the correct alignment between the signals and the back-test orders. Several examples are included to help you learn how these pieces fit together: https://www.hahn-tech.com/ans/parablic-sar-signal-not-firing-in-tos-strategy/ For those who are looking for more training on how to use chart strategies on Thinkorswim I will reference some additional resources: https://www.hahn-tech.com/thinkorswim-strategy-guide/ https://www.hahn-tech.com/tos-strategy-analysis/ https://www.hahn-tech.com/thinkorswim-strategy-analysis/
Marked as spam
|
Please log in to post questions.