Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Market Analyser

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

    Market Analyser

    Hi Guys

    It seems I'm becoming a regular feature on here. Can I ask if the Exclude Weekends option in the market analyser works? I have tried an ATR(100) with it switched on and switched off and I was getting the same values, so I added the following logic to the ATR to see if weekend day bars are coming in to the onbar update and sure enough even when I have exclude weekends set to True I'm getting bars in the OnBarUpdate event that are timestamped with Saturday and Sunday, I assumed these would be prefiltered by the MA if this was switched on? Perhaps my understanding is off here.

    protected override void OnBarUpdate()
    {

    if(Time[0].DayOfWeek == DayOfWeek.Saturday)
    return;

    if(Time[0].DayOfWeek == DayOfWeek.Sunday)
    return;

    }

    For info I'm trying to replicate Gain daily bars by using a 1440 minute timeseries in the MA although i don't see how this should effect the exclude weekends but i thought I'll pass the info in case somehow it's related.

    Cheers
    Ross

    #2
    DangerBoy, I couldn't reproduce this on my end - please make sure to use the same number of lookback back on your chart and the market analyzer (right click in the Market Analyzer > Properties, first entry). Then use the same number on the chart, and set the ATR on the chart also to CalculateOnBarClose = false. My ATR value is then matched exactly.
    BertrandNinjaTrader Customer Service

    Comment


      #3
      Hi Bertrand,

      I'm not sure what you mean by the chart? I'm not comparing the Market Analyser ATR with the chart ATR, I'm comparing the MA ATR with weekend excluded property set to True verse weekend excluded property set to False.

      If I set it to True i have an ATR(100) value of 226 if I set it to false this value is still 226, so this being slightly suspicious I then debugged the indicator and added the ATR(100) to the MA again to see what was coming through on the bar series supplied to the indicator. It seems that whether exclude weekend is set to True or False the incoming bar series appears to be including Saturday and Sunday bars. I would expect there to be no Saturday or Sunday Bars coming into the Market analyser indicator if the Exclude Weekend property is set to "True".

      Ross

      Comment


        #4
        Thanks for clarifying DangerBoy, rechecked and get two slightly different values depending on if weekend data is in / exlcluded. Did you try this with a higher bars lookback setting to? Please try changing this to for example 500 for the 1440 min chart you were using and recheck the ATR value then with toggling the weekend option.
        BertrandNinjaTrader Customer Service

        Comment


          #5
          Hi Bertrand

          I believe i can see the issue, I had already changed the look back period before as I understand that the ATR calculates on historical bars and so needs a bar series with enough previous bars to work with. However what I haven't realised or perhaps this is something that needs to be added in future is that if you change Exclude Weekends from True to False and press ok, the MA is not refreshing the BAR series, i guess it already has it in cache, in the event where the bar series already contains weekends this is a problem obviously as the figures then shown are incorrect, as you mentioned though if i change the lookback period this triggers a refresh of the the bar series and my exclude weekend property is now taken account of as i can see my figure change. I also tested a disconnect and reconnect to the provider and this also refreshes the MA bar series and updates the value, it's only in the instance of changing the exclude weekend property and clicking ok that it does not and you have no change of the values.

          In any case, I now see the issue and you've led me in the right direction so i will remember that for future.

          Thanks
          Ross

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by geddyisodin, Yesterday, 05:20 AM
          7 responses
          45 views
          0 likes
          Last Post NinjaTrader_Gaby  
          Started by gbourque, Today, 06:39 AM
          2 responses
          5 views
          0 likes
          Last Post gbourque  
          Started by cre8able, Yesterday, 07:24 PM
          1 response
          13 views
          0 likes
          Last Post NinjaTrader_ChelseaB  
          Started by cocoescala, 10-12-2018, 11:02 PM
          6 responses
          939 views
          0 likes
          Last Post Jquiroz1975  
          Started by cmtjoancolmenero, Yesterday, 03:58 PM
          1 response
          19 views
          0 likes
          Last Post NinjaTrader_Gaby  
          Working...
          X