Hello,

How can I get the price of a security at the time its drawdown started? And how can I implement this in a conditional statement? For example:

if (The price at which the security is currently trading) == (The price at which its last drawdown started):
           self.SetHoldings("security", 1)

 

I have also attached a backtest to help clarify what I mean in an example.

Thank you.