Current location | Thread information | |
OmniTrader Professional Forum
OmniTrader Pro General Discussion Rolling Pivot Points |
Last Activity 7/8/2024 10:45 AM 45 replies, 8441 viewings |
|
Printer friendly version |
^ Top | |||
Kris Legend Posts: 347 Joined: 4/20/2006 Location: JNB, ZA User Profile | Hi there, There are numerous posts and requests for drawing Pivot Points in the OmniTrader, the closest to my requirement is TraderMike post [ http://www.omnitrader.com/omnitrader/proforum/thread-view.asp?threadid=711&posts=4 ] Attached please find an example what Pivots should look like, [RollingPivots.jpg] generated in TradeStation. The picture shows a 2-min chart with hourly Rolling Pivots. I actually draw Daily Pivots on Hourly charts in preparation for the next trading day [see MyPivots.jpg]. The point is that one should use larger timeframe pivots on lower timeframe chart. Now, DEAR ED and NIRVANA TEAM, I have seen Camarilla Pivots plugin for OT that is avilable to the Club Members. Camarilla uses the same concept, but pivots are at different levels. So, the hard part of coding Rolling Pivots is already done, just the pivot level arithmetic needs to be modified. I appreciate that you want to preserve the Camarilla Strategy for premium clients, but we (the budget clients) want only standard pivots and the ability to write our own systems and strategies. Thanks, Kris [Edited by Kris on 3/11/2007 1:14 PM] Attached file : RollingPivots.JPG (56KB - 776 downloads) Attached file : MyPivots.JPG (114KB - 725 downloads) | ||
^ Top | |||
ANick Elite Posts: 620 Joined: 3/7/2006 Location: Ocean Springs, MS User Profile | I've been looking at serria charts which will cost me $39.00 with data feed and there basic S1 S2 P R1 R2 as a ind that plots every nicely on there charts for no charge. Daily values on 240m charts. If you trade with Infinity broker it works great. Happy Trading ANick [Edited by ANick on 3/14/2007 12:03 PM] | ||
^ Top | |||
Manfred Veteran Posts: 210 Joined: 4/2/2006 Location: South Africa User Profile | When it comes to pivot calculations what is the preferred approach to calculation by those in the know? Lets use weekly floor pivot levels as an example. Does once calc based on the HHV, LLV etc between Monday and Friday, over the 5 days or Does one simply go to the most recent week's close and then calculate pivots in 5 day lookbacks backwards from there to get the trading levels for the current week? Under normal circumstances the two ways are synonymous, but what does one do if there is a public holiday or some other reason that there were only 4 trading days (or less that 4 if > 1 non-trading day) in the week. Do I then calc from Monday to Friday, if say Tuesday was the holiday - and the calc would simply be based on 4 bars or would one ignore the holiday and stick to a 5 day lookback, so in the example given I'd calc using data from Friday back to Monday and since the Tues bar does not exist, the 5th bar back would be last week Friday so that would now be included in the Pivot calc. My problem is OT is I can use either method but the one based on dayofweek() is not foolproof because I'm snookered in my code if Friday is actually the non-trading day so b4 I re-invent the wheel for the umpteenth time I'd like to know which method of calc floor traders actually use in the real world. Thanks [Edited by Manfred on 4/3/2007 10:42 AM] | ||
^ Top | |||
Bill Graves Veteran Posts: 184 Joined: 3/22/2006 Location: Phoenix, Arizona User Profile | Manfred, Pivot calcs are based on the close of the applicable periodic bar: daily, weekly, or monthly. Daily Pivots: If Monday is a holiday, Tuesday's pivot levels are calculated on the previous Friday's high, low & close. If Friday is a holiday, Monday's pivot levels are calculated using the privious Thursday's high, Low & close. Weekly Pivots: If Monday is a holiday, the current week's pivot levels beginning Tuesday are calculated using the previous week's high, low, & close. That weekly bar would close on Friday. If Friday is a holiday, the current week's pivot levels beginning Monday are calculated using the previous week's high, low, & close. That weekly bar would close on Thursday. Also, be sure to use the 24 hour session, not the day session. I hope I am answering the question you asked ~ also that you could make sense of my explanation. -:) ===================================================== EDIT: I don't think I answered the right question. You were asking about how to program this in OT... Sorry. [Edited by Bill Graves on 4/3/2007 11:57 AM] | ||
^ Top | |||
Kris Legend Posts: 347 Joined: 4/20/2006 Location: JNB, ZA User Profile | Well, we have our first (beta) version of Forex Pivots! Big thanks to Manfred who designed the Rolling Pivots based on EOD data (weekly pivots on daily charts). His development enabled me to convert it into Daily Pivots that should be drawn on Hourly Charts, which I trade. I call it Hourly Pivots, because they should be used on the Hourly charts only! From the purist perspective it is an incorrect description, as these are really Daily Pivots that should be drawn on Hourly Charts. Also, it is still work in progress, as current indicator draws only the last set of Pivot levels (no historical pivots at this stage), but it is a great start! Also, we should define better the beginning of the trading day, as currently it will give you different readings, depending on your time-zone. Many traders use 17h00 NYC time as close. I used midnight, which is an hour later in my time-zone (i.e. South Africa). So here it is. Attached please find the code and a picture of what's it look like on my screen. Cheers, Kris PS. Manfred I hope that you don't mind me stealing your thunder. Once again, thank you for your contribution to the Traders Body of Knowledge. Attached file : HourlyPivots.JPG (77KB - 615 downloads) Attached file : HourlyPivots.txt (4KB - 570 downloads) | ||
^ Top | |||
Manfred Veteran Posts: 210 Joined: 4/2/2006 Location: South Africa User Profile | No worries Kris ;-) I have been going in circles trying to get OT to behave with intraday historical Metastock data and I'll concede I kinda got disillusioned when I discovered OT doesnt support it as well as the frustrations with half-implemented date functions which only got me partway to the solution I wanted to implement ito universal non-trading day ignoring pivot calculations since I was testing on stock EOD data. Great to see you managed to get my initial code to kick on intraday data. I still think the lookback method is a trifle inelegant but hey whatever works ;-) In time I'm confident we (and others hopefully :-) can refine this. Have fun ... | ||
^ Top | |||
ANick Elite Posts: 620 Joined: 3/7/2006 Location: Ocean Springs, MS User Profile | Thanks Kris Nice work, testing it on the miniDow, Looks good. ANick | ||
^ Top | |||
Kris Legend Posts: 347 Joined: 4/20/2006 Location: JNB, ZA User Profile | Updated Hourly Pivots with additional Time-Zone adjustment. Still draws only the last set of pivots (no rolling pivots yet). The point of Time-Zone adjustment is that depending where you live, you may want to adjust the Pivots starting point. John Carter (RazorForex.com) suggests to calculate pivots as at Close of Business NYC time. I follow his teaching, so I have set the Time-Zone-Adjust = 1, as at 17h00 (in NYC) it is 23h00 in Johannesburg. Peter Bain (ForexMentor.com) suggests to calculate pivots at beginning of business of the currency domicile market, or re-calculating it when a new major market opens (Tokyo, London, NYC). So, now we can adjust our pivots to the Time-Zone we want. Cheers, Kris Attached file : HourlyPivots.txt (4KB - 540 downloads) | ||
^ Top | |||
Manfred Veteran Posts: 210 Joined: 4/2/2006 Location: South Africa User Profile | Great idea. I'd thought about the TZ issue on the intraday pivots but hadn't come up with any code yet. To save looking things up, here AFAIK are some domicile TZ's: Time Zone New York GMT Tokyo Open 7:00 pm 0:00 Tokyo Close 4:00 am 9:00 London Open 3:00 am 8:00 London Close 12:00 pm 17:00 New York Open 8:00 am 13:00 New York Close 5:00 pm 22:00 Plundered the above from http://www.babypips.com/school/the_skinny_on_forex.html Incidentally this site which I discovered from another OT user's post in this forum is quite neatly laid out, albeit the lighthearted tone may be a little juvenile for some. They have a 'holy grail' blog so we can get more ideas for OT FX systems there. Their 'Cowabunga' one which looks to be partially pivots based might be worth a gander for developing as an OT system if possible. http://www.babypips.com/blogs/pip-my-system/cowabunga_system_faq.html Certainly the trade record looks pretty good. http://www.babypips.com/blogs/pip-my-system/cowabunga_trade_record.html | ||
^ Top | |||
Kris Legend Posts: 347 Joined: 4/20/2006 Location: JNB, ZA User Profile | Fellow traders, forgive me for clogging this forum with yet another draft version of Rolling Pivots. As an amateur programmer I am battling to get it finished. Anyway, we have [rolling] Daily Pivots on 60-min charts working(!!) Unfortunately the Time-Zone adjustment doesn't work any longer and the Pivots are drawn from 00h00 to 23h00. Also, on historical Fridays you will find two sets of pivots(??). Fortunately, the current Friday does have only one [correct] set of pivots. This is because Forex market closes Friday 17h00 (NYC time) and opens on Sunday 17h00 (NYC). Currently 17h00 in NYC is 23h00 in JNB, so on continuous chart I have two midnights an hour apart :) That clearly demonstrates the importance of getting the time-zone right (i.e. drawing the pivots from/to corect trading hours), as one hour out gives somewhat different Pivot levels. Finally, I got a question about the significance of the dotted lines just above/below the central Pivot level. This is called Pivot Range and can be used for Position Trading (going long/short when market penetrates Pivot Range levels and reversing the position when the market penetrates the range in the opposite direction). According to Mark Fisher (read The Logical Trader) it works well with commodities, I find it less effective in the Forex market. Also according to Mark, if the current Pivot Range is narrow, one should expect greater volatility (from daily low to daily high levels) or greater directional move, while when the Pivot Range is relatively wide the market is expected to trade sideways. My interpretation is that if I have narrow Pivot Range I look for the market to move beyond R1/S1 levels and if Pivot Range is wide I look for the market to be contained within the R1/S1 levels. Cheers, Kris Attached file : DailyPivots60minChart.txt (4KB - 537 downloads) Attached file : DailyPivots60minChart.JPG (141KB - 522 downloads) | ||
^ Top | |||
Greg Legend Posts: 337 Joined: 3/22/2006 Location: Mishawaka, IN 46544 User Profile | I don't see any danger of any clogging happening, so clog away my friend. Your work and generosity are apprecitated. Greg | ||
^ Top | |||
Manfred Veteran Posts: 210 Joined: 4/2/2006 Location: South Africa User Profile | Hey Kris, I concur with Greg. Sadly, the only *really* active forum here is the one describing nefarious insects in Nirvana code and the Onmilanguage development and discussion forums are sorely neglected by most. Clog away to your hearts content :-) I've been bashing my head round these infernal pivots when time allows for weeks now - and the pivot calcs are the elementary part! - where I'm having real trouble is making OL comprehend and work around data gaps, non-trading days, etc. I have such an agglomeration of nested IF's in my trial code its scary, so am in the process of trying to simplify the logic. I too havent found a solid work around for timezones so am resigning myself to using the data feed's timezone (for now, just to get it working - then will complicate and hopefully not break it later) I am cursing OL's bar by bar implementation every day. If Nirvana could just expose the entire price array to manipulate and get into the sequence I want so I can then send it to the plot function or for use by a system I would be like a lean hog in manure. Please *do* something here Nirvana, bar-by-bar really cripples development! In my own coding the one glitch I havent resolved - is on a weekly indicator based on the # of trading days in the week - I only know on Monday's close if Friday was a non-trading day and by then Friday's bar is past and I cannot change any variable calc on Friday's bar on the Monday so am playing with ideas of plotting things 1 day delayed but I'm not happy with that so am still scratching me noggin cells. If I ever do come up with something that improves on the pivot status quo I'll post, I'm hopeful the day is getting closer ... Cheers | ||
^ Top | |||
Kris Legend Posts: 347 Joined: 4/20/2006 Location: JNB, ZA User Profile | Howzit all traders (not-so-)interested in Rolling Pivots :), Now we have a set of Daily Pivots rolling over 60-min chart, with the following characteristics: * The historical pivots are plotted at midnight (from the purist perspective that is incorrect), * The current/last pivot can be adjusted to your Time Zone (this one is correct). Frankly, the last pivot set is what matters most -- historical pivots are only for reference -- so although it is far from perfect, I think it is now becoming a tradeable indicator. Cheers, Kris Attached file : DailyPivotsV06.txt (4KB - 484 downloads) | ||
^ Top | |||
Greg Legend Posts: 337 Joined: 3/22/2006 Location: Mishawaka, IN 46544 User Profile | Kris, If you have upgraded to the new pre release did it break your most recent Pivot Point script? When trying to apply this to the chart whcih was not problem before it no places a message in the lower compiler window that Object not set... and then show the chart symbol that I am trying to apply the script to. Just wondering. Greg Attached file : Pivotserror.bmp (1146KB - 457 downloads) | ||
^ Top | |||
Kris Legend Posts: 347 Joined: 4/20/2006 Location: JNB, ZA User Profile | Hi Greg, I am still running 2007_3H. When I saw the list of corrections in the latest patch, I decided to wait for the next one, probably with one or three corrections :). Cheers, Kris | ||
^ Top | |||
Bob McFarland Elite Posts: 669 Joined: 3/22/2006 Location: Georgetown, TX User Profile | Greg, Did you first remove the garbage characters at the end of the .txt file? I always do that before compiling. I haven't tried this indicator since I don't do intraday trading, but the symptoms look a lot like the garbage characters problem. Just open the file in Notepad and delete everything after the last printed character and resave the file. I think you can do the same using the OT IDE editor. Best Regards, Bob | ||
^ Top | |||
Greg Legend Posts: 337 Joined: 3/22/2006 Location: Mishawaka, IN 46544 User Profile | I did that. I am finding now several indicators not working since the K upgrade. Thanks for the suggstion. | ||
^ Top | |||
Bob McFarland Elite Posts: 669 Joined: 3/22/2006 Location: Georgetown, TX User Profile | Sorry that wasn't it. Now I'm thinking I should check my custom indicators and systems and see if any are broken since I upgraded to 3K yesterday. Best Regards, Bob | ||
^ Top | |||
Kris Legend Posts: 347 Joined: 4/20/2006 Location: JNB, ZA User Profile | Well, we have Daily Pivots rolling over 60-min charts (version 0.9). I have changed some logic and I got the TimeZone adjustment partially correct. It adjusts the pivots horizontally (hours), but only the last set of pivots have exactly the right levels. Historical Pivots are still calculated at midnight(?) Also, I managed to eliminate the duplicate pivot which is drawn for Friday + Sunday night. If you substitute (code) line 28 with the inactive line 29 and change lines 30 and 31 accordingly, it corrects the vertical values, but creates other problems. Since the code was designed with default settings for traders in South Africa (GMT +2), I can live with historical pivot values 1-hour out. The last set of pivots is the most important anyway. Manfred and I lost many nights developing this indicator. Hopefully some hot developers from US or other countries can tweak it further to work from their respective country/TimeZone. Cheers, Kris Attached file : DailyPivots60minChart.JPG (115KB - 517 downloads) Attached file : DailyPivots09.txt (3KB - 544 downloads) | ||
^ Top | |||
Kris Legend Posts: 347 Joined: 4/20/2006 Location: JNB, ZA User Profile | Hi all, Attached please find Daily Pivots on 10-min charts: * Silver line indicates the Central Pivot Point. * Green lines are R1, R2, R3, plus mid points between PP-R1 and R1-R2 * Red lines are S1, S2, S3, plus mid points between PP-S1 and S1-S2 Once pivots are drawn, I typically change mid-points to dotted lines, so that I can clearly see which are full and which are mid pivot levels. Also, I have the Time-Zone working, so that you can adjust exactly the right starting point, in my case [the default] is '-1' as 17h00 NYC time is curently 23h00 JNB time. Cheers, Kris Attached file : Pivots_10min.JPG (72KB - 487 downloads) Attached file : DailyPivots10min.txt (2KB - 474 downloads) | ||
^ Top | |||
ANick Elite Posts: 620 Joined: 3/7/2006 Location: Ocean Springs, MS User Profile | Thanks Kris, I REALLY Like the Daily R's & S's on a 10 min chart. Cheers Nick | ||
^ Top | |||
Joshua 1:8 Member Posts: 29 Joined: 5/25/2007 Location: Michigan User Profile | Ditto!!! Kris Thank you very much!!! I dont know much about writing my own scripts (newbie OmniPro) But you made this easy for me to get my pivots back!!! Thanks again! | ||
^ Top | |||
Kris Legend Posts: 347 Joined: 4/20/2006 Location: JNB, ZA User Profile | Hi all, thanks for flowers :) Also, big thanks to Manfred who created the first (daily/weekly) version, on which we could build the hourly version. Attached is the last version of the Rolling Pivots on Hourly Charts. The last version had a bug, where on Sunday/Monday open, two set of pivots would be drawn. It is now eliminated. Cheers, Kris Attached file : DailyPivots60min.txt (3KB - 514 downloads) | ||
^ Top | |||
Kris Legend Posts: 347 Joined: 4/20/2006 Location: JNB, ZA User Profile | I added additional Pivot Levels (R5, R4, ..., S4, S5) So, for volatile days like today we have 5 levels and for quiet days we still have mid-point levels (see atached pic) Cheers, Kris Attached file : Pivots.JPG (161KB - 585 downloads) Attached file : DailyPivots10min.txt (3KB - 473 downloads) Attached file : DailyPivots60min.txt (3KB - 489 downloads) | ||
^ Top | |||
Bob McFarland Elite Posts: 669 Joined: 3/22/2006 Location: Georgetown, TX User Profile | Thanks again Kris. WOW!! Looks like you're making a killing in FOREX. What system are you using to trigger those longs and shorts? I think I recoginze your 2 bar stop in action also. Very often you are triggering a position very close to the pivot point. Very impressive and well done. You must be smiling pretty big after that short today. Bob |
|
Legend | Action | Notification | |||
Administrator
Forum Moderator |
Registered User
Unregistered User |
E-Mail this thread to a friend |
Toggle e-mail notification |