Best way to calculate maximum draw down in a specific open position
-
What is the best way to calculate the max. draw down for an open position?
Say I have an open position,and it started to move against me , I would like to close at a certain loss (absolute of percentage wise), can anyone guide me as to how to do this in backtrader ? -
@trade-prophet just issue the stop order, and position will be closed at that level.
-
But I need to detect the stop has reached,
or is there an internal mechanism for it in bt ? -
@trade-prophet backtrader will do it. Check out the https://www.backtrader.com/docu/order-creation-execution/order-creation-execution.html
-
I would like to exit on a specific loss from top , the link above explains entries only , not exists(buy stops not stop loss)
-
@trade-prophet stop order is always the same order, doesn't matter if you open position or close. If you are in the long position, for example, you need to calculate price level lower than current price and issue stop order at this level As soon as price will cross the level from above, stop order will be executed.
-
Great,thank you !
So,as soon as the order is executed on notify_order - issue the reverse stop order ,right ? -
@trade-prophet as soon as order executed position will be closed. Why it should issue reversed stop order?
-
I meant as soon as the order is executed on notify_order - issue the close stop order(sell order in case of long orders)
-
@trade-prophet notify_order treats stop orders as any other order, it will be marked as executed with all related data as execution price etc established.
-
On this topic, see the post made today
-
Thank you very much for all your help, much appreciated!