OmniTrader Professional Forum - OmniTrader Pro General Discussion
Rolling Pivot Points

^ Top
Kris

Posts: 347

Joined: 4/20/2006
Location: JNB, ZA

User Profile
 
Subject : Rolling Pivot Points
Posted : 3/11/2007 10:07 AM
Post #4233

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
Attached file : RollingPivots.JPG (56KB - 751 downloads)
Attached file : MyPivots.JPG (114KB - 702 downloads)

^ Top
ANick

Posts: 618

Joined: 3/7/2006
Location: Ocean Springs, MS

User Profile
 
Subject : RE: Rolling Pivot Points
Posted : 3/14/2007 12:02 PM
Post #4253 - In reply to #4233

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


^ Top
Manfred

Posts: 210

Joined: 4/2/2006
Location: South Africa

User Profile
 
Subject : RE: Rolling Pivot Points
Posted : 4/3/2007 10:41 AM
Post #4467 - In reply to #4253

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
^ Top
Bill Graves

Posts: 184

Joined: 3/22/2006
Location: Phoenix, Arizona

User Profile
 
Subject : RE: Rolling Pivot Points
Posted : 4/3/2007 11:46 AM
Post #4471 - In reply to #4467

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.
^ Top
Kris

Posts: 347

Joined: 4/20/2006
Location: JNB, ZA

User Profile
 
Subject : RE: Rolling Pivot Points
Posted : 4/11/2007 2:23 PM
Post #4533 - In reply to #4233

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 - 587 downloads)
Attached file : HourlyPivots.txt (4KB - 544 downloads)

^ Top
Manfred

Posts: 210

Joined: 4/2/2006
Location: South Africa

User Profile
 
Subject : RE: Rolling Pivot Points
Posted : 4/11/2007 3:00 PM
Post #4534 - In reply to #4533

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

Posts: 618

Joined: 3/7/2006
Location: Ocean Springs, MS

User Profile
 
Subject : RE: Rolling Pivot Points
Posted : 4/11/2007 3:12 PM
Post #4535 - In reply to #4233

Thanks Kris
Nice work, testing it on the miniDow, Looks good.

ANick
^ Top
Kris

Posts: 347

Joined: 4/20/2006
Location: JNB, ZA

User Profile
 
Subject : RE: Rolling Pivot Points
Posted : 4/22/2007 1:07 AM
Post #4579 - In reply to #4233

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 - 517 downloads)

^ Top
Manfred

Posts: 210

Joined: 4/2/2006
Location: South Africa

User Profile
 
Subject : RE: Rolling Pivot Points
Posted : 4/22/2007 6:53 AM
Post #4587 - In reply to #4579

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

Posts: 347

Joined: 4/20/2006
Location: JNB, ZA

User Profile
 
Subject : RE: Daily Pivots v0.5
Posted : 5/5/2007 4:51 AM
Post #4757 - In reply to #4233

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 - 514 downloads)
Attached file : DailyPivots60minChart.JPG (141KB - 495 downloads)

^ Top
Greg

Posts: 337

Joined: 3/22/2006
Location: Mishawaka, IN 46544

User Profile
 
Subject : RE: Rolling Pivot Points
Posted : 5/5/2007 8:23 AM
Post #4759 - In reply to #4233

I don't see any danger of any clogging happening, so clog away my friend. Your work and generosity are apprecitated.

Greg
^ Top
Manfred

Posts: 210

Joined: 4/2/2006
Location: South Africa

User Profile
 
Subject : RE: Daily Pivots v0.5
Posted : 5/6/2007 4:26 AM
Post #4770 - In reply to #4757

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

Posts: 347

Joined: 4/20/2006
Location: JNB, ZA

User Profile
 
Subject : RE: Rolling Pivot Points
Posted : 5/9/2007 1:42 AM
Post #4812 - In reply to #4233

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 - 461 downloads)

^ Top
Greg

Posts: 337

Joined: 3/22/2006
Location: Mishawaka, IN 46544

User Profile
 
Subject : RE: Rolling Pivot Points
Posted : 5/11/2007 7:40 PM
Post #4866 - In reply to #4233

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 - 433 downloads)

^ Top
Kris

Posts: 347

Joined: 4/20/2006
Location: JNB, ZA

User Profile
 
Subject : RE: Rolling Pivot Points
Posted : 5/12/2007 6:30 AM
Post #4878 - In reply to #4233

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

Posts: 669

Joined: 3/22/2006
Location: Georgetown, TX

User Profile
 
Subject : RE: Rolling Pivot Points
Posted : 5/12/2007 12:00 PM
Post #4880 - In reply to #4866

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

Posts: 337

Joined: 3/22/2006
Location: Mishawaka, IN 46544

User Profile
 
Subject : RE: Rolling Pivot Points
Posted : 5/12/2007 12:13 PM
Post #4881 - In reply to #4233

I did that. I am finding now several indicators not working since the K upgrade. Thanks for the suggstion.
^ Top
Bob McFarland

Posts: 669

Joined: 3/22/2006
Location: Georgetown, TX

User Profile
 
Subject : RE: Rolling Pivot Points
Posted : 5/12/2007 12:23 PM
Post #4883 - In reply to #4881

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

Posts: 347

Joined: 4/20/2006
Location: JNB, ZA

User Profile
 
Subject : RE: Rolling Pivot Points
Posted : 5/16/2007 4:31 PM
Post #4944 - In reply to #4233

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 - 490 downloads)
Attached file : DailyPivots09.txt (3KB - 521 downloads)

^ Top
Kris

Posts: 347

Joined: 4/20/2006
Location: JNB, ZA

User Profile
 
Subject : Daily Pivots on 10-min Chart
Posted : 5/31/2007 4:34 PM
Post #5094 - In reply to #4233

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 - 461 downloads)
Attached file : DailyPivots10min.txt (2KB - 452 downloads)

^ Top
ANick

Posts: 618

Joined: 3/7/2006
Location: Ocean Springs, MS

User Profile
 
Subject : RE: Rolling Pivot Points
Posted : 6/1/2007 12:31 PM
Post #5105 - In reply to #4233

Thanks Kris, I REALLY Like the Daily R's & S's on a 10 min chart.



Cheers
Nick
^ Top
Joshua 1:8

Posts: 29

Joined: 5/25/2007
Location: Michigan

User Profile
 
Subject : RE: Rolling Pivot Points
Posted : 6/3/2007 2:10 PM
Post #5128 - In reply to #5105

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

Posts: 347

Joined: 4/20/2006
Location: JNB, ZA

User Profile
 
Subject : RE: Rolling Pivot Points
Posted : 6/4/2007 4:27 AM
Post #5137 - In reply to #4233

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 - 492 downloads)

^ Top
Kris

Posts: 347

Joined: 4/20/2006
Location: JNB, ZA

User Profile
 
Subject : RE: Rolling Pivot Points
Posted : 7/25/2007 1:49 PM
Post #5890 - In reply to #4233

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 - 559 downloads)
Attached file : DailyPivots10min.txt (3KB - 451 downloads)
Attached file : DailyPivots60min.txt (3KB - 468 downloads)

^ Top
Bob McFarland

Posts: 669

Joined: 3/22/2006
Location: Georgetown, TX

User Profile
 
Subject : RE: Rolling Pivot Points
Posted : 7/25/2007 4:21 PM
Post #5894 - In reply to #5890

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
^ Top
Tony

Posts: 411

Joined: 3/21/2006

User Profile
 
Subject : RE: Rolling Pivot Points
Posted : 7/25/2007 5:09 PM
Post #5898 - In reply to #5890

HI Chris and Manfred,

I want to just thank you for all of your work and contribution to the pro forum. You not be aware that you have a following of folks that truely appreciate you work. Currently, I still trade a dummy account in FX. I enjoy trading pivots and will at some point get ot set up for FX. So once again thank you as this looks like a tool that I could use.

tony
^ Top
Kris

Posts: 347

Joined: 4/20/2006
Location: JNB, ZA

User Profile
 
Subject : RE: Rolling Pivot Points
Posted : 7/26/2007 11:19 AM
Post #5918 - In reply to #4233

Hi Bob,

Unfortunately the best moves normally happen while I am in the office. Typically I pickup the "cigarette-butts" of the forex market, i.e trades that are available to me in the evening :-)

I view it as a real problem, because if a strategy gives me very good back-test results, I should trade every signal(!), otherwise I cannot expect consistent performance (in line with the back tested results). Now if profitable trades are during mid-day, but I trade in the evening, I may be picking-up the less profitable trades(the butts!?). That is why automated trading is so important, I am building up some courage to let my computer lose.

Anyway, typically I use very simple strategies with 1-2 related system(s), 1-filter/confirmation and 1-stop. Since we are talking about Pivots, attached is a strategy with Pivot Filter that serves me well in a volatile market (i.e. FX):

* two systems - RSI-P & RSI-TLB
* Pivot Filter - allow long trades when price is above the central pivot level of the next larger time frame (short vice versa), e.g. on 60-min chart my filter is daily central pivot level, and on daily chart my filter is weekly central pivot level.
* my forex stop within a forex trade-plan.
* attached are all required files.

Also, I believe that with this strategy it is important to carefully select/enable correct timeframes. For example, I disable the 10-min timeframe. For 10-min I use different filter setting and a different stop (my 2-bar stop)

Tony, thank you for your good word. Welcome to Forex, the dark side of the market. I migrated to Fx about 16 months ago and I am slowly losing interest in stocks and futures :-)

Cheers, Kris

Attached file : ForexStop.txt (1KB - 336 downloads)
Attached file : Forex.ott (92KB - 342 downloads)
Attached file : fx-RSI.ots (664KB - 360 downloads)

^ Top
Kris

Posts: 347

Joined: 4/20/2006
Location: JNB, ZA

User Profile
 
Subject : RE: Rolling Pivot Points
Posted : 7/27/2007 3:34 AM
Post #5929 - In reply to #4233

Well, I think we can retire the DailyPivots60min indicator, as OT2007 FloorPivot() does a great job if one adjusts the Exchange Information [menu] >> Edit >> Exchange Information..., where one can specify correct time-zone and market hours.

However, the DailyPivot10min (top right on attached pic) is still useful as it shows mid-points between the R#-PP-S# levels. Typically after a narrow day (see 19-Jul and 25-July on bottom right Hourly chart) the next day's (20-Jul and 26-Jul) pivots are bunched up and one should be ready for a larger move. Conversely, after a large move on a day like yesterday (26-Jul) one should use the mid points, see 10-min chart (top right corner) for precise entry and exit points.

By the way, yesterday we had another massive JPY move from central Pivot level all the way to S5 level(!) This time I was in from of my trading station and made some good cash :-)

Cheers, Kris

Attached file : JPY.JPG (204KB - 353 downloads)

^ Top
RichardL

Posts: 211

Joined: 3/11/2006

User Profile
 
Subject : RE: Rolling Pivot Points
Posted : 7/27/2007 11:13 AM
Post #5934 - In reply to #5918

Hi Kris

I tried to fire up your files, but the filter function is looking for FloorPivot_Above() and FloorPivot_Below()

If you are happy to post them, would be very grateful.

all the best

Richard
^ Top
Kris

Posts: 347

Joined: 4/20/2006
Location: JNB, ZA

User Profile
 
Subject : RE: Rolling Pivot Points
Posted : 7/27/2007 12:04 PM
Post #5936 - In reply to #4233

Oops, I forgot that I turned script into a function module.

Go to strategy builder > Filter block > Conditions > Long (window) and delete the "FloorPivot_Above()" string and enter: C > (H[1]+L[1]+C[1])/3

In the Conditions > Short (window) delete "FloorPivot_Below()" and enter: C < (H[1]+L[1]+C[1])/3

That will do the trick.

Cheers, Kris

^ Top
RichardL

Posts: 211

Joined: 3/11/2006

User Profile
 
Subject : RE: Rolling Pivot Points
Posted : 7/27/2007 12:56 PM
Post #5938 - In reply to #5936

Magic, thanks Kris

and to echo the others in sincere thanks for the amazing code you and Manfred put together - it is inspirational but must be v hard graft to get right so very much appreciated for sharing.

cheers
Richard
^ Top
Tony

Posts: 411

Joined: 3/21/2006

User Profile
 
Subject : RE: Rolling Pivot Points
Posted : 8/8/2007 11:01 AM
Post #6031 - In reply to #4233

Hi Folks,

just wanted to mention that the posted fx strategy does offer some great signals. But be careful if one is testing it as you will experience changing signals with timeframe in filter set at current plus one.

Have we ever found a way to keep a signal from dissapearing once it is present in these higher timeframe confirm strategies.

Thanks,

Tony
^ Top
Kris

Posts: 347

Joined: 4/20/2006
Location: JNB, ZA

User Profile
 
Subject : RE: Rolling Pivot Points
Posted : 8/8/2007 12:59 PM
Post #6033 - In reply to #4233

Tony,

Thanks for pointing it out, I forgot to mention. The logic behind the (Pivot) filter in a timeframe: Current+1 is designed to maintain consistent signals, but in volatile markets the signals may change.

Lets assume that we have 5-min, 60-min, daily and weekly timeframes within our profile. If we trade on 60-min timeframe, the pivot filter will be on daily timeframe. Now, if the market opens and stays below the central daily pivot level, only short signals will be allowed. However, when the market rallies above the central daily pivot level the filter allows only the long signals. As a result, because 60-min closing price is above the the daily pivot level, the strategy allows only long signals for the whole day, recalibratig signals fired this morning(!?) I am afraid that it is not perfect, but it still works reasonably well.

Also, I wouldn't use it in a profile with too many timeframes. E.g. I wouldn't want to trade on 5-min chart with a filter based on 15-min bar(!) In fact in my 5-min strategy I use filter in Current+2 timeframe, i.e. daily pivot (skipping the 60-min timeframe).

I hope it makes sense. Cheesr, Kris
^ Top
Tony

Posts: 411

Joined: 3/21/2006

User Profile
 
Subject : RE: Rolling Pivot Points
Posted : 8/8/2007 4:54 PM
Post #6039 - In reply to #4233

Hi Kris,

very good feedback. Much appreciated. Yes, using multiple timeframe confirm is sound. But I am still wondering if we have a workaround that keeps signal in place on the voteline / focus list once signal is fired even though volitiliy may have change the filter condition to where it is no longer true?

Yes, this is an old issue that is once again popping up.

Thanks,

Tony
^ Top
Matthew Greenslet

Posts: 2077

Joined: 2/27/2006

User Profile
 
Subject : RE: Rolling Pivot Points
Posted : 8/9/2007 9:23 AM
Post #6049 - In reply to #4233

If you do not want your signals to change as a result of optimization Click Edit | To Do List and under the Test Settings tab use a fixed back test period. This will prevent the back test from shifting automatically so OT will always use the same data set for optimization which will always result in the same settings. However please note that at some point you will want to manually move your back test period to a closer date. If your strategy relies on optimization, the further you get away from your back test boundary the signal accuracy will degrade.
^ Top
Kris

Posts: 347

Joined: 4/20/2006
Location: JNB, ZA

User Profile
 
Subject : RE: Rolling Pivot Points
Posted : 9/7/2007 2:44 PM
Post #6368 - In reply to #4233

Rolling Pivots strike again (!)

Check Hubert's video: http://clicks.aweber.com/z/ct/?UfPCSh97eeG5anPGdVU_Fw

Then attached pictures, and if you like it download the indicator.

According to Hubert, it works well in quiet/sideways markets. Looking at today's market, it is amazing how many currencies respected these levels.

Cheers, Kris


Attached file : EUR_2_min.JPG (88KB - 331 downloads)
Attached file : JPY_2_min.JPG (79KB - 316 downloads)
Attached file : Pivots02min.txt (2KB - 335 downloads)

^ Top
Greg

Posts: 337

Joined: 3/22/2006
Location: Mishawaka, IN 46544

User Profile
 
Subject : RE: Rolling Pivot Points
Posted : 9/7/2007 4:18 PM
Post #6369 - In reply to #4233

Kris,

Do you have any ideas why I would get this look? This is RT
Attached file : RollingPivots.png (5KB - 329 downloads)

^ Top
Kris

Posts: 347

Joined: 4/20/2006
Location: JNB, ZA

User Profile
 
Subject : RE: Rolling Pivot Points
Posted : 9/8/2007 12:41 AM
Post #6374 - In reply to #4233

Hi Greg,

Current version works on 2-min charts only(!). I have updated the code to ensure that if the chart periodicity is different to 2-min the indicator doesn't draw anything. Next version will be more flex...

Sorry, I wasn't specific enough in my post (although it is documented within the indicator code).

Cheers, Kris

Attached file : Pivots02min.txt (2KB - 327 downloads)

^ Top
Kris

Posts: 347

Joined: 4/20/2006
Location: JNB, ZA

User Profile
 
Subject : RE: Rolling Pivot Points
Posted : 9/8/2007 2:27 AM
Post #6376 - In reply to #4233

I am experiencing intellectual difficulty with auto-detecting the chart periodicity, so attached please find Hourly Floor Pivots for 1-min, 2-min and 5-min charts respectively.

The last indicator (Pivots1hr05min.txt) code includes my current thinking on detecting chart periodicity, but it isn't working (yet).

To avoid confusion all three indicators will draw pivots only on correctly specified chart period, i.e. it will draw 5-min rolling pivots only on 5-min chart, but will not draw the garbage that Greg alerted me to on e.g. 2-min chart.

Maybe one of the more accomplished developers could have a look at the Pivots1hr05min.txt code and help us get the auto-chart-periodicity to work.

Cheers, Kris


Attached file : Pivots1hr01min.txt (2KB - 357 downloads)
Attached file : Pivots1hr02min.txt (2KB - 363 downloads)
Attached file : Pivots1hr05min.txt (3KB - 381 downloads)

^ Top
Kris

Posts: 347

Joined: 4/20/2006
Location: JNB, ZA

User Profile
 
Subject : RE: Rolling Pivot Points
Posted : 9/8/2007 4:03 PM
Post #6385 - In reply to #4233

Interesting strategy based on 240-min Floor Pivot Points at: http://www.forexfactory.com/showthread.php?t=38542

Similar principles could be used for 60-min Floor Pivots posted in a previous note.

Cheers, Kris

^ Top
Matthew Greenslet

Posts: 2077

Joined: 2/27/2006

User Profile
 
Subject : RE: Rolling Pivot Points
Posted : 9/10/2007 1:55 PM
Post #6405 - In reply to #4233

Here is a hack to get the periodicity.

If SymbolData.Periodicity = 1 Then Timeframe = Intraday And Minute = SymbolData.Compression

If SymbolData.Periodicity = 2 Then Timeframe = Daily

If SymbolData.Periodicity = 3 Then Timeframe = Weekly
^ Top
Zimbo

Posts: 2

Joined: 7/1/2006
Location: Johannesburg, South Africa

User Profile
 
Subject : RE: Rolling Pivot Points
Posted : 10/31/2012 12:46 PM
Post #21377 - In reply to #4233

Its been some 4 years now since the coding for the Floor pivot indicator was posted up by Kris. I just love this indicator but am not very adept at coding. I copied the code into my OT 2012 PR 3C and it came up with a compling error as follows;

FileName: ; Line: 0; Char: 0; Error Number: -2;
Microsoft (R) Visual Basic Compiler version 8.0.50727.5420
for Microsoft (R) .NET Framework version 2.0.50727.5456
Copyright (c) Microsoft Corporation. All rights reserved.

C:\Program Files (x86)\Nirvana\OT2012\VBA\Temp\indDailyPivots60min.txt(165) : error BC30451: Name 'C' is not declared.

If (Bar > (C.Length() - ((NumberHistoricalPivots * LookBack) + CurrLookBack(Bar)))) Then
~
C:\Program Files (x86)\Nirvana\OT2012\VBA\Temp\indDailyPivots60min.txt(204) : error BC30451: Name 'C' is not declared.

ElseIf ((Bar > (C.Length() - CurrLookBack(Bar))) And (afBARHOUR_23(Bar - 1) <> 23)) Then
~

Maybe the newer version of OT has broken the code for the 2007 version. Can anybody help me with this?
^ Top
Jim Dean

Posts: 3433

Joined: 3/13/2006
Location: L'ville, GA

User Profile
 
Subject : RE: Rolling Pivot Points
Posted : 10/31/2012 5:09 PM
Post #21379 - In reply to #21377

That code (in the error msg) is totally incorrect (re OLang syntax) in several ways. If you want assistance with it please post the full original OLang code.

Sometime in the past couple of years the OLang Parser has gotten much less helpful in the nature of the way it reports problems. Doesn't give line numbers in the orig OLang code in many cases where it used to. And other things.

Lots of times now the code/line#'s in the error msg is the code from the Temp file.

So the only way to diagnose it is look a the original OLang routine in full.
^ Top
JB

Posts: 434

Joined: 6/6/2006

User Profile
 
Subject : RE: Rolling Pivot Points
Posted : 11/13/2012 8:13 PM
Post #21408 - In reply to #5894

Hi Folks I think I may have made a useful offering but you will have to be your own judges of that!

I have come up with a variation to the hour code for looking at shorter pivot periods.

I woould love to hear feed back about this one. It seems to me following in Frank O's way of thinking that the pivots do offer very useful directional info.

What I need to get from here is an indicator to plot the pivot direction ie if the centre pivot is lower that the previous centre pivot then return equals = 1, if the pivot is the same then 0 and if higher then return 2.

I have had a go with mixed results if anyone can help it would be appreciated.

I did not understand the need for the divide by one in Kris's original code for the hour pivot at compiled line 16 "CurrLookBack = BarMinute()/1".
Attached file : JBIntraPivotIdea.txt (4KB - 303 downloads)
Attached file : JBIntraPivotIdea.png (61KB - 500 downloads)

^ Top
beech pilot

Posts: 36

Joined: 11/1/2018
Location: Visalia

User Profile
 
Subject : RE: Rolling Pivot Points
Posted : 2/6/2023 10:06 PM
Post #32191 - In reply to #5890

hello i get a compile error any help




***** Global *****:
FileName: ; Line: 0; Char: 0; Error Number: -2;
Microsoft (R) Visual Basic Compiler version 14.8.4084
for Visual Basic 2012
Copyright (c) Microsoft Corporation. All rights reserved.

This compiler is provided as part of the Microsoft (R) .NET Framework, but only supports language versions up to Visual Basic 2012, which is no longer the latest version. For compilers that support newer versions of the Visual Basic programming language, see http://go.microsoft.com/fwlink/?LinkID=533241

C:\Program Files (x86)\Nirvana\OT2023\VBA\Temp\rp.txt(168) : error BC30451: 'C' is not declared. It may be inaccessible due to its protection level.

If (Bar > (C.Length() - ((NumberHistoricalPivots * LookBack) + CurrLookBack(Bar)))) Then
~
C:\Program Files (x86)\Nirvana\OT2023\VBA\Temp\rp.txt(207) : error BC30451: 'C' is not declared. It may be inaccessible due to its protection level.

ElseIf ((Bar > (C.Length() - CurrLookBack(Bar))) And (afBARHOUR_23(Bar - 1) <> 23)) Then
~

Compiler return value: 1
Build failed.
^ Top
Barry Cohen

Posts: 2289

Joined: 1/1/1900

User Profile
 
Subject : RE: Rolling Pivot Points
Posted : 2/7/2023 4:41 PM
Post #32194 - In reply to #32191

Beech Pilot, that error was posted & responded to later in this thread.


https://www.omnitrader.com/currentclients/proforum/thread-view.asp?threadid=904&posts=46