Value for Sunday different for strategy and indicator

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #96758 quote
    Vonasi
    Moderator
    Master

    I recently noticed that the returned value for opendayofweek and dayofweek is different in a strategy to an indicator. It returns a value of 7 in a strategy and zero in an indicator.

    Surely this just leads to confusion especially if for example cutting and pasting an indicator code that detects Sunday into a strategy to hard code it in or calling an indicator using a value for the day of the week?

    I guess changing it to be the same value now is too late as people will be running strategies and indicators based on the old values.

    Screenshot_1-4.png Screenshot_1-4.png
    #96766 quote
    Nicolas
    Keymaster
    Master

    Live with or without MTF activated with IG, or demo account?

    #96774 quote
    Vonasi
    Moderator
    Master

    IG demo.

    Back test this strategy:

    buy at -close limit
    
    graph opendayofweek 
    graph dayofweek

    ..and apply this indicator:

    Return opendayofweek as " opendayofweek", dayofweek as "dayofweek"
    #96777 quote
    Nicolas
    Keymaster
    Master

    Dax? Same with forex pairs? Sorry I can’t test now and it will help for sure. Btw, a report is already in the pipe.

    #96778 quote
    Vonasi
    Moderator
    Master

    My platform is also closed at the moment. I was originally testing on DJI but the above image was taken from EURUSD.

    #96955 quote
    Nicolas
    Keymaster
    Master

    News about this is that a fix is on its way to be implemented.

    Vonasi thanked this post
Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.

Value for Sunday different for strategy and indicator


Platform Support: Charts, Data & Broker Setup

New Reply
Author
author-avatar
Vonasi @vonasi Moderator
Summary

This topic contains 5 replies,
has 2 voices, and was last updated by Nicolas
6 years, 10 months ago.

Topic Details
Forum: Platform Support: Charts, Data & Broker Setup
Language: English
Started: 04/18/2019
Status: Active
Attachments: 1 files
Logo Logo
Loading...