Sell after n days #788
-
Hi! How do you create a sell signal 7 days after entry? Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Hey, I am new to coding, so do check this, but the dataframe you use in Backtest should have datetime as the index, so you can call that as follows to create a day index you can call in your trade entry/exit criteria (depending on what time interval your dataframe has you could possibly include for hour and minute too): class VA_Strategy(Strategy):
|
Beta Was this translation helpful? Give feedback.
See #505.