@backtrader
My goal is described in my old post:
https://community.backtrader.com/topic/1076/daily-upper-and-lower-bound-of-price/3
Only here I am trying to take into account daily upper and lower bound of price for target order.
target order or not, I did try to follow your suggestion in old post, but:
Having a custom Sizer
This wont work for me since my order are with specific size, a global custom Sizer will be overwritten.
2.Having a commission scheme
I read the custom commission scheme, dont see how this will work. The
def _getcommission(self, size, price, pseudoexec)
only pass in the execution price for orders, not previous bar's (when the order is created) close price, I wont be able to compare these two prices thus impose an inf commission accordingly.
Official name for such trading restriction is called daily maximum price fluctuation I think, and it is common in commodity futures as well, might be a good idea to implement such feature natively.