Backtest and timezone not matching

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #108503 quote
    MomoMomo
    Participant
    Junior

    hi i created a very simple indicator that marks the euro session to 1 and all other sessions to 0 see below.

    Now my timezone that i am using is set to gmt +8 but when i use the backtest and test very simple open trade when indicator is 1 and close if 0 then this does not match.

    i have tested by putting the timezone to utc +0 and when i run the backtest then i see the its correct. is the backtest using a different timezone or is this just a bug and how can i fix this to use my current set timezone.

    below is the simple code

    starttime = 150000
    endtime = 230000
    
    tradetime = 0.0
    
    if time>=starttime and time<=endtime then
    tradetime = 1.0
    endif
    
    RETURN tradetime
    #108521 quote
    robertogozzirobertogozzi
    Moderator
    Legend

    The time zone you set on your PC are not read by PRT.

    PRT software works on PRT servers, so you need to customize trading time and hours as from attached pic.

    x-17.jpg x-17.jpg
    #108581 quote
    MomoMomo
    Participant
    Junior

    so backtesting is not based on on the timezone set on the local pc but on the server?

    i have set the settings you mentioned but still the same not getting a match

    #108584 quote
    robertogozzirobertogozzi
    Moderator
    Legend

    Will you please attach a pic of your settings?

    #108585 quote
    VonasiVonasi
    Moderator
    Master

    Momo Kanouni – please always use the ‘Insert PRT Code’ button when putting code in your replies as it makes it much easier for others to read. I have tidied up your post for you. 🙂

    #108596 quote
    MomoMomo
    Participant
    Junior

    yes sorry

    timezone.jpg timezone.jpg
    #108606 quote
    robertogozzirobertogozzi
    Moderator
    Legend

    Try selecting the second option (of the first 3).

Viewing 7 posts - 1 through 7 (of 7 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

Backtest and timezone not matching


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
Momo @momo_kanouni Participant
Summary

This topic contains 6 replies,
has 3 voices, and was last updated by robertogozzirobertogozzi
7 years ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 09/26/2019
Status: Active
Attachments: 2 files
ProRealCode ProRealCode
Loading...