For code/output blocks: Use ``` (aka backtick or grave accent) in a single line before and after the block. See: http://commonmark.org/help/
Need Help on Simple Limit Order Code
-
Hi, I am new to Backtrader and I can't figure out how to write a simple strategy:
I am using Yahoo's daily data.
If today's Open is lower than previous day's Close, then place a limit buy order at 80% of today's Open price.
If the order is executed (i.e the limit price is higher than the Low price the the day), then sell the stock at Close.Can any one show me how to write the code?
Thanks.