Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How to adjust time on X axis

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

    How to adjust time on X axis

    Hi,

    I am doing some strategy optimisation and want to optimise the particular strategy for specified start and stop times on the chart. In the time zone I am in, the actual start time is 10.00pm and the stop time is 2.00am. The strategy optimiser does not seem to like crossing the midnight time change, and when I run the strategy optimiser no trades are taken. If I change the start and stop times in the strategy optimiser to 6.00pm to 10.00pm, so that the time does not cross midnight, it works fine.

    So all I think I need to do is change the time on the X axis of the charts while running the strategy optimisation, so that the start and stop times do not cross the midnight time, and then change it back after I have completed the exercise. To do this I have tried changing the time as well as the time zone on my PC, rebooting the PC, but this does not make any difference. I have also changed the session template from "Use instrument settings" to Default 24/7, but this did not help.

    If you can help me to change the time settings on my charts it would be much appreciated. I am sure there is something very simple I am missing. I am running Windows 7 64 bit version, and the version of NT7 is 64 bit 7.0.1000.25.

    Many thanks,

    Ken C.

    #2
    Hello Ken C,

    Unfortunately it is not supported to change the time axis within NinjaTrader. The only way would be changing the PC clock as you describe.

    Could it be the strategy conditions to submit orders just did not occur during 10:00 PM and 2:00 AM? How many days do you include in your optimization - does each day not show trades?

    Do you see all requested historical data in the Chart-tab of the Strategy Analyzer?

    I do not see how crossing midnight would cause strategies not to produce any trades. Are you able to reproduce it using the SampleMACrossOver strategy with a custom session template that runs from 10:00 PM to 2:00 AM?
    JasonNinjaTrader Customer Service

    Comment


      #3
      Hi Jason,

      I tried the SampleMACrossOver strategy with a custom session template that runs from 10:00 PM to 2:00 AM and it worked fine. So that makes me think there is a problem with the strategy code because it works perfectly if not crossing the midnight barrier. The strategy should have opened and closed orders within the specified time period, but it did not when crossing midnight. The chart tab also showed no orders at all when in fact there should have been.

      However I managed to change the time on the X axis of the charts by changing the time zone of my computer and this works fine, so I have a workaround that works OK.

      Thanks for your help with this.

      Ken C.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by algospoke, Yesterday, 06:40 PM
      2 responses
      19 views
      0 likes
      Last Post algospoke  
      Started by ghoul, Today, 06:02 PM
      3 responses
      14 views
      0 likes
      Last Post NinjaTrader_Manfred  
      Started by jeronymite, 04-12-2024, 04:26 PM
      3 responses
      45 views
      0 likes
      Last Post jeronymite  
      Started by Barry Milan, Yesterday, 10:35 PM
      7 responses
      20 views
      0 likes
      Last Post NinjaTrader_Manfred  
      Started by AttiM, 02-14-2024, 05:20 PM
      10 responses
      181 views
      0 likes
      Last Post jeronymite  
      Working...
      X