Daily condition true, enter EOD?


Category:
0
0

If I use, say, a daily MACD strategy that’s true at, say, 3:50 pm, can some code get it to buy before end-of-day instead of at the next day’s opening?  (Idea comes from: https://www.quantifiedstrategies.com/does-the-macd-indicator-work/)

RESOLVED
Marked as spam
Posted by (Questions: 6, Answers: 3)
Asked on April 26, 2021 3:02 pm
153 views
0
Private answer

This question has already been solved in the following post:

https://www.hahn-tech.com/ans/automatically-close-position-before-market-close/

This requires that you already know how to use the Condition Wizard:

https://www.hahn-tech.com/thinkorswim-condition-wizard/

As well as the Conditional Order:

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

 

Marked as spam
Posted by (Questions: 37, Answers: 4117)
Answered on April 26, 2021 4:06 pm
0
all very good. but going to the conditional order vid, 28 min to 30, you\’re displacing the signal one bar to the right in case the RSI should suddenly drop on the current bar, invalidating the signal. what i want to do is have the order execute if that daily signal is still good on the current day at, say, ten minutes before closing. i see how that\’s done in the order-rules box. but i don’t see how to translate that into code i can then look at as part of a strategy in the charts tab, for backtesting purpose. maybe it’d happen if i hit save in the order-rules area but for all i know it’d just execute the order. which i don\’t want to do, eventho the market is closed.
( at April 26, 2021 5:09 pm)
0
Step one, build your condition in the Condition Wizard of the conditional order. Step two, set time frame to daily and confirm the condition you build triggers at the correct points on the chart. Step three, set the order type to MARKET and set the execution time. If the condition you build is true at the time you select the order will be sent to market. That's as far as I can take you through this. The rest is up to you. I suggest you contact the trade desk at TD Ameritrade since you are concerned about the order executing prematurely.
( at April 26, 2021 7:05 pm)
0
In regards to your comment about applying this to a chart strategy for back-testing. That is well beyond the scope of assistance we can provide free of charge in the Q&A Forum. But the templates we provide in the "AutoTrade" Almost video should make that pretty simple.
( at April 26, 2021 7:08 pm)
0
oh, gee, i got it. i'm such a dummy sometimes.
( at April 27, 2021 2:07 pm)