Change Opening Hours

Forums ProRealTime English forum ProOrder support Change Opening Hours

Viewing 4 posts - 1 through 4 (of 4 total)
  • #235586

    I have created a script for trading the US TECH 100-CFD. I use SMA Daily Charts as entry and exit criteria. Is it possible to create a code that uses the opening hours of the underlying market, which are 09:30:00-22:00:00, instead of the CFD opening hours for backtesting and automatic trading?

    #235587

    The indicator TRSMA at https://www.prorealcode.com/prorealtime-indicators/time-range-moving-averages-simple-exponential-weighted-trsma-trema-trwma/ will do the job, as you can set the desired time range. Outside that time range it remains flat.

     

    1 user thanked author for this post.
    #236117

    Takk…Unknown command for “CALCULATEONLASTBARS = 200”.

    #236118

    That command is not available for strategies.

    If you want to embed that code into your strategy then you have to use these lines, choosing your preferred settins (Periods, StartTime and EndTime):

    then use variable TRSMA to know the value.
    Alternatively, you can call the indicator using the CALL statement, as follows:

    changing the values ​​20, 90000 (it would be 090000, but leading zeros are ignored) and 240000 as you like.

Viewing 4 posts - 1 through 4 (of 4 total)

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