PRT v11 – CurrentDayOfWeek

Forums ProRealTime English forum ProBuilder support PRT v11 – CurrentDayOfWeek

  • This topic has 2 replies, 2 voices, and was last updated 3 years ago by avatarsmf1.
Viewing 3 posts - 1 through 3 (of 3 total)
  • #155121

    Hello,

    I built an indicator that use the function CurrentDayOfWeek and it worked perfectly before the version 11 of PRT. With the v11 the function CurrentDayOfWeek returns exaclty the same value of DayOfWeek. I wrote an email to the PRT support thinking the problem was simply a bug that came out with the release of the new version, but instead the answer from the support is this: “After analysis, this is not a mistake but a behaviour that we have changed in order to have the same results between BackTesting and Indicator. Moreover, it will be not sense when you have in the past to be able to know a future date.

    I must admit I’m a little stunned by the answer, but I take note of the position of PRT and ask help here.

    My indicator draw lines on the chart reporting yesterday and today Open, High, Low, Close for Dax, Nasdaq and Forex pairs and take into consideration open and close time of the session (excluding overnight). Given the different session open and close time, it distinguish Dax, Nasdaq and Forex pairs using price. So, for example, Dax open is set at 9.00 AM and close at 5.30 PM. In order to recognize the previous day and detect the relative open, high, low and close values, I use CurrentDayOfWeek and set as previous day = CurrentDayOfWeek-1 or previous day=5 (friday) if CurrentDayOfWeek is 1 (monday).

    Considering the PRT support answer my indicator cannot work with PRT11 (I wonder what the sense of keeping the function CurrentDayOfWeek!). Do you have any alternative solutions to obtain the same lines on my charts? I attach the ITF file here and an immage of a chart as example.

    Thanks a lot

    Stefano

    #155163

    I’ve never used CURRENTDAYOFWEEK. To return yesterday’s and today’s values, I use:

     

    #155181

    Thanks Roberto….it was much simpler than my complicated idea!

    Buon Natale

    Stefano

    1 user thanked author for this post.
Viewing 3 posts - 1 through 3 (of 3 total)

Create your free account now and post your request to benefit from the help of the community
Register or Login