Value for Sunday different for strategy and indicator

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #96758 quote
    VonasiVonasi
    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
    NicolasNicolas
    Keymaster
    Legend

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

    #96774 quote
    VonasiVonasi
    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
    NicolasNicolas
    Keymaster
    Legend

    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
    VonasiVonasi
    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
    NicolasNicolas
    Keymaster
    Legend

    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.
ProRealAI ProRealAI New

Stuck on this ProBuilder code?

Describe what this topic is trying to build, in plain English, and ProRealAI writes the ProRealTime™ indicator, screener or system for you.

Available in 7 languages
Try ProRealAI

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 NicolasNicolas
7 years, 6 months ago.

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