Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

taking some day off

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

    taking some day off

    Is it possible to not consider a specific day when backtesting a period?

    I want to backtest last 30 days despite 04/22/2014, for instance..

    #2
    Hello Dafonseca,

    Thank you for your post.

    Yes this is possible.

    You would want to use this code snippet as a starting point -
    Code:
    if(ToDay(Time[0]) == 20140422) return;
    This will convert the Time[0] from backtesting to a yyyymmdd format and check that if date is the 22nd of April and if so to return.

    Let me know if I can be of further assistance.
    Cal H.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by GussJ, 03-04-2020, 03:11 PM
    16 responses
    3,281 views
    0 likes
    Last Post Leafcutter  
    Started by WHICKED, Today, 12:45 PM
    2 responses
    19 views
    0 likes
    Last Post WHICKED
    by WHICKED
     
    Started by Tim-c, Today, 02:10 PM
    1 response
    9 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by Taddypole, Today, 02:47 PM
    0 responses
    5 views
    0 likes
    Last Post Taddypole  
    Started by chbruno, 04-24-2024, 04:10 PM
    4 responses
    53 views
    0 likes
    Last Post chbruno
    by chbruno
     
    Working...
    X