"x days ago" conditional ...can it be back tested?

32 views
Skip to first unread message

Miguel Garcia

unread,
Oct 16, 2022, 5:06:14 PM10/16/22
to OptionStack
Hello, I' m running an OptionStack trial,  can't find a way to implement an "x days ago" condition...researched the existing days/calendar functions to no avail.

Below the relevant parts, how can I back test this?, tks:

No bearish signal at least x days ago
MACD hist bullish
or
MACD hist below signal line >=6 days ago     

and

Crossed threshold from oversold condition x days ago
Stochastics below 30 1 day ago
and
Stochastics above 35









OptionStack

unread,
Oct 16, 2022, 5:41:37 PM10/16/22
to OptionStack
You can use the LookBack study to reference the state of another study X time periods ago.  The LookBack study can be use to wait X days after a market condition has occurred, before placing a trade.  

For instance, to reference the Stochastic study 1 day ago, you can use LookBack -> Stochastic (1 period)

To simply the logic, you can assign each of these states / conditions into Variable blocks.  

MACD LookBack.png


Wait X Days Using LookBack.png

For more information, please see the following article:  Wait X Days After 

The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory or other services by OptionStack. In addition, the content of the website offers no opinion with respect to the suitability of any security or any specific investment.  There are no guarantees as to accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. Past performance is no indication or guarantee of future results. All investments involve risk – including loss of principal. You should consult with an investment professional before making any investment decisions.
Reply all
Reply to author
Forward
0 new messages