For code/output blocks: Use ``` (aka backtick or grave accent) in a single line before and after the block. See: http://commonmark.org/help/
showing only specific orders on the plot
-
How can I show only specific bracket orders( having specified condition in the code) on the plot? For example, showing only bracket orders having positive result.
-
You would have to code an
Observer
which only pays attention to specific orders.It's not something which is a builtin in backtrader
-
Thanks for you reply.
I know that I should implement this by using observer class, but i don't know how.
I want to plot only buy/sell pairs that those corresponding trade is positive. -
Your best bet is to look at the source of the
Trades
observer and only plot the trades of your choosing.