ProOrder and Customized Time Zones
Forums › ProRealTime English forum › ProOrder support › ProOrder and Customized Time Zones
- This topic has 19 replies, 3 voices, and was last updated 8 years ago by Nicolas.
-
-
04/23/2016 at 4:35 PM #5855
Good afternoon.
Looking for help because I can’t get ProOrder to take into account customized time zones on my automated daily trading strategy. Any idea ?
Thanks !!
Below the details :
I want ProOrder to potentially place trades everyday at 7am UK time, based on conditions computed at close of the previous daily bar. In other words, I want both my charts and ProOrder to run in customized time zone, 7am to 6:59:59am everyday. I thought that would be simple, but I can’t get it to work
I’m trading indices that have a standard market time zone from midnight to 11:59:59pm.Here is what I did and what happened :
– I went to platform options / timezones and trading hours, and selected “diplay all data in this timezone” and chose the “UTC-6” timezone. In the chart windows, I also chose my charts to be all displayed in daily bars. It worked fine: after reloading the platform, all my charts successfully displayed daily bars, with each daily bar starting at 7am UK time (i.e., midnight in UTC-6 time zone)
– At this stage, I tested ProOrder with a dummy, super simple code: “IF Close>Close[1] THEN BUY 1 CONTRACTS AT MARKET ENDIF”
– But then, instead of placing orders at 7am UK time on the next day, ProOrder placed orders at midnight UK time. Instead of computing the condition above based on 7am to 6:59:59am bars (UK time, as displayed on my charts), I believe it computed it based on mignight to 11:59:59pm bars (UK time, not displayed on my charts). In other words, even though PRT correctly displayed charts in my customized time zone, ProOrder totally ignored my customized time zone.Any way to fix this ?
Many thanks
04/23/2016 at 4:37 PM #585604/23/2016 at 4:47 PM #5858Thank you Nicolas.
Daily I believe, because I launched this strategy directly from my charts that correctly display daily bars in my customized time zone (i.e. one bar per day, and a new bar everyday at 7am UK time).
I did not add any specific code beyond this.
Thanks !
04/23/2016 at 7:29 PM #5869Ok, so that’s where is the trouble I believe..
Without the code I can’t be sure, but as you already may know, each conditions are tested only once a bar. So that’s one of the reason I think your trade are initiated at midnight only … 🙂 You should set your ProOrder on a less timeframe to test conditions each minute or each 5 minutes maybe.. but without the code I cannot be much more helpful!
04/24/2016 at 8:13 AM #5875Thank you Nicolas. I understand, but the issue is my stategy is based on conditions that should be tested daily, based on daily bars (the same daily bars that are successfully displayed in my PRT charts, i.e. daily bars that run from 7am to 6:59:59am). I believe if I change the timeframe, my whole strategy becomes meaningless (I don’t want an order to be place potentially every 5 minutes; I don’t want ProOrder to take into account information from the past 5 minutes only).
My understanding was indeed that ProOrder tested the conditions once only per bar and placed orders at the beginning of the next bar. My charts correctly display daily bars that incoporate all price movements from 7am to 6:59:59am each day, so I thought ProOrder would test the conditions at 6:59:59 and place orders at the beggining of the following bar at 7:00:01. But it does not. It tests conditions and places orders at midnight, irrespective of my bars as displayed on the chart.
I don’t think it has anything to do with my code, because at this stage I am (on purpose) using a super simple, test code (my real strategy is obvioulsy more complex): “IF Close>Close[1] THEN BUY 1 CONTRACTS AT MARKET ENDIF”.
Let’s take a super simple example, e.g. on April 20
– I thought my code would buy 1 contract at 7:00:01 on April 20 (if the price of the instrument was higher at 6:59:59am on April 20 than at 6:59:59 on April 1)
– What it really did is buy 1 contract at 00:00:01am on April 20 (if the price of the instrument was higher at 11:59:59pm on April 19 than at 11:59:59pm on April 18)
It probably has more to do with settings somewhere. Or maybe customized time zones just don’t work well with daily bars (i.e., they correctly impact charts, but don’t impact ProOrder)… Or maybe I just totally misunderstood how ProOrder works.
Thank you so much for your insights
04/24/2016 at 8:16 AM #5876Sorry there was a typo in my example. Here is how it should go:
Let’s take a super simple example, e.g. on April 20
– I thought my code would buy 1 contract at 7:00:01am on April 20 (if the price of the instrument was higher at 6:59:59am on April 20 than at 6:59:59am on April 19)
– What it really did is buy 1 contract at 00:00:01am on April 20 (if the price of the instrument was higher at 11:59:59pm on April 19 than at 11:59:59pm on April 18)
04/24/2016 at 12:10 PM #5883I’m not sure, but I don’t think that ProOrder deal with customized timeframe chart like you want it. But what i’m sure at the moment, is that your strategy needs to be adapted to this behaviour of ProOrder. If you want to deal with daily candlesticks informations that occurs between 7:00 am and 6:59 am, you’ll may need to create your own variables into your code to simulate this customized timeframe.
If you need OHLC only between this 2 hours, it can be coded obviously.
04/24/2016 at 7:19 PM #5907Thank you Nicolas that’s helpful. OHLC will not be sufficient. I need to run complex indicators (MME, CCI, ATR, Bollinger…) based on this customized time zone (my code above was just a dummy, simplified code). My complex indicators work perfect in the charts, in my customized time zone. But ProOrder just ignores my charts and customized time zone and places orders at the wrong time.
I’ll try to reach out to the PRT team, because I’m still slightly confused why the simple claim “orders are placed at the beginning of the next bar”, which appears everywhere on PRT’s tutorials and training materials, seems just not true when timezones are customized and daily bars are used.
Thanks again Nicolas
Best
04/24/2016 at 7:45 PM #591304/25/2016 at 1:29 PM #5953Loeiz, can you have a look at the timezone used in your ProOrder window? (see picture attached)
Also, please be aware that strategy already running needs to be removed from ProOrder and re-installed each time you modify your timezone. The date of the code version currently running appears on the upper right corner of the strategy (picture).
04/25/2016 at 8:33 PM #5997Good evening Nicolas. The timezone for my Srategy in ProOrder is UTC-6 (because midnight in UTC-6 is 7am UK time) (see picture attached).
That’s exactly what I have in my PRT graphs. That way, I get a new daily bar in my charts at 7am UK time every day. Because ProOrder is supposed to open new orders at the beginning of a new bar, I thought it would place orders at 7am UK time. But it actually places them at midnight UK, i.e. in the middle of my bars as diplayed on my charts… Puzzling
04/25/2016 at 8:47 PM #5998Even stranger : I just noticed : when I launch a new strategy, there’s a small blue bubble next to timezone details of my strategy (see attachement)
The bubble basically confirms that my strategy will be launched in UTC-6, and that this timezone will be taken into account for all intraday instructions.
But instead of placing orders at midnight UTC-6 (i.e. 7am UK), ProOrder places orders at midnight UK time, i.e. 5pm UTC-6, which seems to contradict the blue bubble.
04/25/2016 at 9:08 PM #600204/26/2016 at 6:47 AM #6011With pleasure 🙂
Attached the trade journal for last night. I did the two trades at the top manually at 7:36 and 7:37 French time just to double-check what the time-zone the trade journal is displayed in (it’s displayed in French time). As you can see, all other trades were initiated by ProOrder, slightly after 1am French time, i.e. slightly after midnight UK time, i.e. 5pm in UTC-6, i.e. right in the middle of my daily bars (as displayed in PRT in UTC-6), rather than at the beginning of them.
04/26/2016 at 4:02 PM #6036Ok, I get answers from PRT about this. Pretty much what I were thinking about at first glance :
The options of the platform for time and time slots only apply on intraday views.
If the customer changes this option daily data are always the same.
It is not possible to change the GMT of the day view because this option requires to reconstruct data from intraday data and does not have enough history to calculate.In the case of the daily IG platform uses as reference midnight London time GMT + 1 except for Australian markets are GMT + 10
The only alternative will be to define a strategy intraday (1 hour for example) with a flat before 7am UK time and use the Dclose variables to simple conditions on daily data.
If the strategy used by against a complicated indicators (moving average, bollinger …) calculated daily it is not possible to achieve as multi timeframe is not available on ProBuilderSo it’s seems not possible to auto trade daily timeframe with customized time zones, sorry…
-
AuthorPosts
Find exclusive trading pro-tools on