Trading hours in code vs platform options
Forums › ProRealTime English forum › ProOrder support › Trading hours in code vs platform options
- This topic has 10 replies, 4 voices, and was last updated 3 years ago by Monobrow.
-
-
12/12/2016 at 9:48 PM #18415
Hi
I have some strategies I want to run on a 24hr time zone and others on a 9am to 5am basis. This is on the SA top 40 index which trades 24 hrs a day besides weekends.
I then set the platform options so that the trading hours are from 9am to 5pm and did some back testing. But I have some strategies that I want to run 24 hrs a day . So I have set it back to the 24 hrs. setting and changed some of my strategies to only take trades from 9am to 5pm using TIME or OPENTIME.
I found that one cannot get the same results using TIME or OPENTIME from 9am to 5pm compared to changing the Platform options trading hours 9AM to 5PM.
The results are significantly different and I suppose this is because when one sets the Platform trading hours it will ignore the indicators values outside of the trading hours.
Am I correct in my assumption? and secondly how do I work around this because I would like to trade some strategies 24 hrs. a day and others 9am to 5pm but without losing the lose of performance when one uses TIME or OPENTIME.
Regards
Ian
01/20/2021 at 9:33 PM #158733Am I correct in my assumption?
As nobody on here appears to know the answer, best ask PRT direct using the Form on the link below.
https://www.prorealtime.com/en/contact
1 user thanked author for this post.
01/20/2021 at 11:12 PM #15874801/20/2021 at 11:27 PM #158751Monobrow please might you be the first member to complete the Log on the link below?
Let us know any problems or queries with completion of the Log?
Thank You
01/21/2021 at 2:36 PM #15882501/21/2021 at 2:44 PM #15882601/21/2021 at 3:13 PM #15883301/21/2021 at 6:00 PM #158845So code like Flat before Flat after, time = > 100000 and time <= 160000 doesn’t work anymore??
I am not Monobrow, but I’d say : of course that still works !
“custom trading hours” can only be controlled via the user interface and not through code.
As in : set. Also see the OP. 🙂
Btw, what would be the problem with for those strategies you trade (*and* have dedicated code for !) build in the time = > 100000 and time <= 160000 ? if you only leave that If out of the code for the 24 hour instruments.
Actually it could be so that the OP (Ian) wanted something “odd”. That’s why he left (or went broke ;-)).Maybe I am wrong myself !
01/21/2021 at 6:14 PM #158847I am not Monobrow, but I’d say : of course that still works !
Thats right, opening trades using time restrictions in code still works (as far as I know anyway).
I already control the actual chart trading hours by the user interface as it does give… favourable outcomes for me on indicator calculations – at least for now.
In short what I was hoping we could do is use custom trading hours as a variable in code to see how the results came out without having to do it manually. Shame we can’t but not the end of the world.
01/21/2021 at 7:08 PM #158856custom trading hours
I’m probably confused … what is the difference between custom trading hours and Flat before Flat after or Time >= and Time <= ?
Is it that setting custom trading hours (e.g. start 09:00) via user interface means that, for example, MA periods only start calculating at the beginning of custom trading hours (e.g. from 09:00) set in the user interface??
I don’t want to miss out and you lot joining Vonasi in the Greek Islands on your Yachts without me!!! 🙂 🙂
01/21/2021 at 8:23 PM #158860Is it that setting custom trading hours (e.g. start 09:00) via user interface means that, for example, MA periods only start calculating at the beginning of custom trading hours (e.g. from 09:00) set in the user interface??
Yep, exactly that. I found out by accident, that by avoiding Asia open in my periods it just worked… better. I have no idea why, but i figure its all relatively arbitrary, so if it works, why not! 👍
1 user thanked author for this post.
-
AuthorPosts
Find exclusive trading pro-tools on