For code/output blocks: Use ``` (aka backtick or grave accent) in a single line before and after the block. See: http://commonmark.org/help/
SessionFilter removing too many candlesticks, creating wrong trades?
-
Hi everyone, for my backtest, I specified the trading hours and used session filter to process what I need (9:00EST to 15:30EST). My strategy also uses bracket orders (take profit / stop loss). What I noticed is that with session filter on, any candles not within the specified hours is removed from the plot. So, my last trade on Day1 will gap up/down based on the first bar of Day 2 even though it could've been filled by 16:00EST of Day1. Is there anyway of not removing the candles with session filter or force close the trade before the next day? Any other suggestions will also be highly appreciated :)
-
You can certainly put a code in next that checks the time, and after a certain time, close all orders.