Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Higher Freq Bars Missing Basic Signal

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Higher Freq Bars Missing Basic Signal

    Evening all,

    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!

    Click image for larger version  Name:	Busted Strat.png Views:	0 Size:	173.8 KB ID:	1122736
    Last edited by ozziyhtomit; 10-14-2020, 07:23 PM.

    #2
    Hello ozziyhtomit, thanks for your post.

    The best way to debug will be to use the Print method. That will let you print out data from the script to see why conditions are not becoming true. In this case, print out the data right before the entry condition:

    Print(HMA[0]);
    Print(HMA[1]);
    Print(HMA[2]);
    if(HMA[2] > HMA[1]) && (HMA[1] < HMA[0]))
    { EnterLong(); }

    We do not recommend doing backtests on Renko bars because, in real-time, Renko bars can re-draw their open based on the direction of the price, and that can not be done in the simulation engine. It would be a better use of time to backtest using real time or playback data so you can see the actual results of the strategy so you can avoid the unrealistic results of a Renko backtest.

    I look forward to hearing of your results.

    Comment


      #3
      Thanks Chris,

      Upon closer inspection I am also seeing that when running this in real time with Renkos, the order tags sometimes collect at the end of the chart, all bunched up. Here is an image of the above strategy running on a chart. It looks like the trades did not happen but they did (I was watching this whole time). And, their tags collected at the right hand side of the chart. Have you ever seen this?

      Click image for larger version

Name:	62446219196__7C2B50DD-254D-4EEB-A3AA-6FFFE1157EEE.JPG
Views:	296
Size:	563.5 KB
ID:	1122850

      Comment


        #4
        Hello ozziyhtomit, thanks for your reply.

        Do you have any additional instruments on the chart? Do you see that happening on a blank chart with no other indicators, only the Renko bars?

        If none of these apply, please reset your database by going to Tools>Database Management>Reset Database>Reset. Test the strategy after completing this.

        I look forward to assisting.

        Comment


          #5
          The cosmetic problem happens still even after resetting.

          Forget about it, it's just cosmetic. But it looks terrible.

          If I see any more missed trades I'll post here.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by NullPointStrategies, Today, 05:17 AM
          0 responses
          43 views
          0 likes
          Last Post NullPointStrategies  
          Started by argusthome, 03-08-2026, 10:06 AM
          0 responses
          124 views
          0 likes
          Last Post argusthome  
          Started by NabilKhattabi, 03-06-2026, 11:18 AM
          0 responses
          65 views
          0 likes
          Last Post NabilKhattabi  
          Started by Deep42, 03-06-2026, 12:28 AM
          0 responses
          42 views
          0 likes
          Last Post Deep42
          by Deep42
           
          Started by TheRealMorford, 03-05-2026, 06:15 PM
          0 responses
          46 views
          0 likes
          Last Post TheRealMorford  
          Working...
          X