Intraday Seasonal Indicator
Forums › ProRealTime English forum › ProBuilder support › Intraday Seasonal Indicator
- This topic has 12 replies, 3 voices, and was last updated 6 months ago by Nobody.
-
-
03/29/2020 at 12:18 PM #123794
Hello everyone, it’s been a while since I haven’t written here but today I have to propose something that could be useful for everyone.
I want to make an indicator that says hourly intraday seasonality, throughout the week. Like Larry Williams’, I attach the image.
Do you believe it is possible to create something like this?
03/29/2020 at 12:51 PM #123799This is only really a practical proposition in v11 where we now have arrays. It could be done in v10.3 but would involve an awful lot of repetitive coding and would be quite slow to draw I believe.
At the moment I only have end of day data in v11 so I can’t help with anything on hourly charts on there at the moment and I’m not sure that I want to get involved in a massively repetitive v10.3 code right now!
1 user thanked author for this post.
03/29/2020 at 1:08 PM #123802Here is an example of how it could be done in v10.3. I’ll let you fill in the remaining 1160 odd lines of code and then error check it! It would just be a few lines of code in v11 with arrays.
1234567891011121314151617181920212223242526defparam drawonlastbaronly = trueif openhour = 1 and opendayofweek = 1 thenh1d1 = h1d1 + (close - open)h1d1count = h1d1count + 1h1d1avg = h1d1/h1d1countendifif openhour = 2 and opendayofweek = 1 thenh2d1 = h2d1 + (close - open)h2d1count = h2d1count + 1h2d1avg = h2d1/h2d1countendif//...and repeat another 166 timesdrawsegment(barindex-169,0,barindex-168,0+h1d1avg)lastvalue = 0+h1d1avgdrawsegment(barindex-168,lastvalue,barindex-167,lastvalue+h2d1avg)lastvalue = lastvalue+h2d1avgdrawsegment(barindex-167,lastvalue,barindex-166,lastvalue+h3d1avg)lastvalue = lastvalue+h3d1avg//....and repeat another 165 timesreturn03/29/2020 at 4:05 PM #123821Just to let you know that I got a bit bored so I have started working on the indicator. I have got it working and debugged on the first two days of the week (image attached) and so now it should be a simple find and replace exercise to complete the code and then add some labelling to the axis. I’ve got to do something else now so I will try to complete it later or tomorrow.
1 user thanked author for this post.
03/29/2020 at 9:04 PM #123845If you really can do it you’re the best 🙂
03/29/2020 at 9:17 PM #12385203/29/2020 at 9:33 PM #123853I found time to finish it. It works on v10.3 but is slow to calculate so be patient!
Just an ITF file attached as the code is 2405 lines long so I did not want to post the code.
You can set a start date if you want to only analyse more recent data. Set it to zero to analyse all data.
Apply it on the 1 hour chart only.
Feedback welcome before I submit it to the library.
1 user thanked author for this post.
03/29/2020 at 9:49 PM #123856Sorry Vonasi, with what program can I open the itf file?
03/29/2020 at 10:03 PM #12385708/28/2021 at 6:04 AM #176395Hello again, vonasi.
I am fan of this work here with the seasonal curve of the week. I use it a lot. Some small programs I have written based on this curve.
Further up in the thread you wrote “Here is an example of how it could be done in v10.3. I’ll let you fill in the remaining 1160 odd lines of code and then check for errors! It would be just a few lines of code in v11 with arrays.”
I was going to ask you, ask if you could write the few lines in v11. That way we would have a match to see if the curve from v10.3 matches the curve from v11.
Could you do that for us?
09/03/2021 at 9:48 AM #17671609/05/2021 at 6:29 AM #17679705/13/2024 at 3:54 PM #232607 -
AuthorPosts
Find exclusive trading pro-tools on