Register Login
Forums    February 9, 2012
TradersStudio Forums
manually offsetting a date
Last Post 08-04-2009 07:26 AM by Andrew Batianoff. 2 Replies.
Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
Andrew Batianoff
New Member
New Member
Posts:4

--
07-05-2009 09:35 PM

    I would like to start trading a specified number of days before or after a certain date...how would I do this?

    Dim Val

    Dim Delay

    Delay = -10

    val = DateSerial(87,05,05) + delay

     

     

     

     

    mur ang
    Advanced Member
    Advanced Member
    Posts:525

    --
    07-14-2009 12:47 PM

    I am assuming calendar days or trading days, also what do you do if the date you pick is a non trading day, saturday or sunday.

     

     Depending on the answers to these questions things are different.

    val = DateSerial(year, month, day)
    +delay 

    should work  to get you a valid serial date , but it might not be a trading day.

    How are you using this date ?.

    In print , comparing to another date ?.

     

    Andrew Batianoff
    New Member
    New Member
    Posts:4

    --
    08-04-2009 07:26 AM
    If possible to offset X number of business days is the best option....how would I do that?
    You are not authorized to post a reply.


     TradersStudio, Inc. ® Copyright 2004-2012 All Rights Reserved   Terms Of Use  Privacy Statement