Close of the Week
Forums › ProRealTime English forum › ProBuilder support › Close of the Week
- This topic has 8 replies, 4 voices, and was last updated 7 years ago by Pere.
-
-
06/25/2017 at 9:14 AM #3897406/25/2017 at 9:33 AM #3897506/25/2017 at 9:39 AM #38976
Similar question if I may add to yours Petrus … is the Open of the Day considered to be Midnight (+ 1msec if you like) or the Open time of the Cash Market in the Instrument?
Take for example the DAX, it closes at 16:30 (UCT+2) so is the + or – movement from 16:30 to 09:30 the next day (Dax open?) considered as + 60 points (for example) at Open??
OR
Is DAX value at midnight in Germany the Close and midnight + is the Open??
Apologies Petrus not an answer to your question, but same / similar principles apply to yours and my question?
GraHal06/25/2017 at 9:55 AM #3897706/25/2017 at 10:10 AM #38978Thanks for your answer Grahal, I totally agree with your questions/doubts. But I think we mix here two different questions.
The close time depends on the indice, pair of Forex or share.
But if we speak about DAX and weekly timeframe, for example, the close for the week is on 23:00 of Friday, and open of the week is on 0:00 of Monday. And I’m working with IG and CFDs, which makes sometimes the problem bigger. You only have to see the graphics on different timeframes. The open-close of the futures is 9:00-17:30, and another problem of the CFDs is that I cannot see any gap between close of last day and open of today, because it is almost continuous.
My question was only to call the weekly close (or open) value from another timeframe. Of course I can do it, but it seems too complicated for me, defining the close time for every índice, for every day, etc. But for example, in Tradestation there is an instruction like CloseM, CloseW, or CloseD to define the close for the month, week or day.
1 user thanked author for this post.
06/25/2017 at 10:41 AM #3898206/25/2017 at 10:42 AM #38983Hi,
There’s no direct command I’d be aware of to get open or close of the week, however the keyword “opendayofweek” giving the day number in the week at open of your candle in any timeframe can be used in combination with an “if” statement to retrieve monday’s open and friday’s close, therefore giving you open and close of week in any timeframe. Would look like this do the trick, to be tested:
123456789if OpenDayOfWeek=1 thena=DOpen(0)b=cendifif OpenDayOfWeek=5 thenc=Dclose(0)endifreturn a as "open of the week", b as "close of previous week", c as "friday's live close of current week", 5200+OpenDayOfWeek*10 as "day of week"Above “a” is your current week open, “b” is your previous week close… “c” is just your live close on a friday as a temporary current week close, but of course would only be your real current week close at last tick on friday.
You might wonder why I didn’t use Dclose(1) on a monday to retrieve previous week’s close, that’s simply because it would get “sunday night close” instead of friday’s for IG with such a syntax, so the way proposed above should nicely work around this, and get friday’s close regardless of dataflow being from an instrument with no sunday night data or a cfd with some sunday night data.
06/25/2017 at 11:00 AM #38986OK, understood
I do have something but it will work only on the Daily timeframe so probably not very useful 🙁
06/25/2017 at 11:45 AM #38987 -
AuthorPosts
Find exclusive trading pro-tools on