-
Hi, Today, i am running the same strat, but with more data (1 week more of OHLC data) and my algo take it in case, and said to me that i must change my TP and SL, it should be ... tp 2.2, sl 1.3, with current price at 1.6. So, to "detect" this changes, currently, I have to check "manualy". Currently, I run my strat, print the TP/SL in one side, open my bank account TP/SL in other side, and compare the values. When you have one stock, that's quiet easy to check, but if you have something as 20 stocks, it quiet hard to know that the sl/tp have changed and if you bank.tps/sls are up to date. I would like to be able to know that with the "_strategy" with something like that :
Hope that's more or less clear ... |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
It's not entirely clear to me at least. 😅 What are you missing? Something like: if orders[-1].set_at == date.today(): can be achieved if you expand class YourStrategy(Strategy):
...
def buy(**kwargs):
super().buy(**kwargs)
last_order = self.orders[-1]
last_order.set_at = date.today()
... This would add |
Beta Was this translation helpful? Give feedback.
It's not entirely clear to me at least. 😅 What are you missing?
Something like:
can be achieved if you expand
buy()
/sell()
:This would add
.set_at
attribute on orders which you can filter on.