I am building a very simple 'always in' base case for a higher freq trade into a few different futures. For simplicity, I am testing on NQ future and a Renko Brick of 4.
I am using a basic HMA on the bars. When the HMA goes from upward to downward, I get short. When from downward to upward, I get long. Nothing else.
So:
(HMA[2] > HMA[1]) && (HMA[1] < HMA[0]) -->> EnterLong()
(HMA[2] < HMA[1]) && (HMA[1] > HMA[0]) -->> EnterShort()
Pretty simple! I tagged the trades so they show up on the chart when the strategy file is applied to a live SIM chart.
The problem is some of the signals are not traded. This also happens with production by the way. The signals are sometimes not taken when a strat file is run on live Renko bars. The signals are taken when the backtester runs on historical. The strat file I am using in the backtester and in the chart live SIM are one and the same.
So my question is what the heck is going on here? I am attaching a screenshot. The top is the live SIM chart w the strat running on it. The bottom is the Strategy Analysis chart with the indicator added to it. I aligned them to show roughly the same time window. The arrows point to spots where there should be trades but there aren't.
Thank you to anyone who can assist.
PS: I know there is a flaw in using Renko Bricks in the backtester bc the high/low wicks are not in there. I believe this messes up stop and trail etc logic but I have none of that in here: it's just an always in flipper. My input into the HMA calc is the Close series so I don't believe this could create an inaccuracy. Also, I am starting an instance of the indicator itself within the strategy* so I believe the math is matching the visual. (I also printed the HMA values calced by the strategy and compared to the chart's indicator values and they match.)
*HMA myCalculatedHMA = HMA(Close, HMA_Lookback);
Thank you all!
Comment