Help coding ADR indior
Results 1 to 2 of 2

Thread: Help coding ADR indior

  1. #1
    I am looking to code a ADR indior that'll exhibit the Annual ADR excluding weekends.


    The line of code that I have presently is:

    while(ExcludeSundayData TimeDayOfWeek(iTime(Symbol(),PERIOD_D1,n))==0) n ; // If TimeDayOfWeek yields 0 add 1 to skip Sunday

    This will bypass Sunday but I would like to be able to also bypass Saturdays, I'm not a fluent coder and have been gashing things together up to now.

    I possess the ADR displayed and working on 365 so only need to have the ability to shed Saturday in addition to sunday.

    Any help appreciated.

    Regards

    Console

  2. #2
    Simply duplie the Lineup (a if-statement rather) for a check for saturday, too, i.e. (pseudocode): for (all days)if (saturday) skip; Should (sunday) skip; /*or else count me */

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
This website uses cookies
We use cookies to store session information to facilitate remembering your login information, to allow you to save website preferences, to personalise content and ads, to provide social media features and to analyse our traffic. We also share information about your use of our site with our social media, advertising and analytics partners.