How to extract trade buying price? #326
Unanswered
Chunger-Lo
asked this question in
Q&A
Replies: 1 comment 1 reply
-
Did you see Something like: for trade in self.trades:
if self.data.Close < trade.entry_price * .9:
trade.close() |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, I am a rookie to quantitative trades,
I really love the backtest output of this framework,
and I just want to modify the tutorial example:
Instead of comparing long and short sma signal,
my buying criteria is : current_price > ema
my selling criteria is : current_price < buy_price * 0.9
so I am wondering how to extract the buy_price (the price when I bought) from the trade?
and how to use it as a selling criteria
Sorry for the dumb question, please let me if there's any misunderstanding.
Thank you!
Beta Was this translation helpful? Give feedback.
All reactions