Welcome to the Traders Laboratory Forums.
Coding Forum Collaborate, receive help, or discuss coding related issues.

Reply
Old 06-03-2009, 02:03 PM   #1

cunparis's Avatar

Join Date: May 2008
Location: Paris
Posts: 154
Ignore this user

Thanks: 238
Thanked 45 Times in 25 Posts

How to Make a Data into an Oscillator?

Hi, this is one of my first posts here but I've been lurking for a while. I'm a professional software develop (Java) and I've been developing trading systems and tools, both automated and discretionary. However I'm not that good at math.

I have some data that I'd like to turn into an oscillator but I'm not sure how. Ideally I'd like my oscillator to go between 0 and 100 if possible but that's not totally necessary. I've been playing around with the stochastic formula and also MACD. It seems those are the most used to make oscillators.

To take a couple examples, I'd like to make an oscillator of the put/call ratio. One could say it's already an oscillator but it's not centered around zero and it often leans one way or the other for long periods of time.

Another example is the TICK index. I'd like to come up with an oscillator for that.

Another example is I'd like to see if I can use the overnight range (using ES for this example) to make something useful. I have no idea if this will work but I'd like to give it a shot.

I can handle the coding, so if you feel like sharing some ideas I'll code it up and post the code & charts for everyone's benefits. I'm hoping we can come up with something useful together.
cunparis is offline  
Reply With Quote
Old 06-04-2009, 04:54 AM   #2

BlowFish's Avatar

Join Date: Mar 2007
Location: In Da House
Posts: 3,292
Ignore this user

Thanks: 129
Thanked 1,054 Times in 702 Posts

Re: How to Make a Data into an Oscillator?

You might want to look at John Ehlers work. he approaches things from a signal processing point of view which is quite appropriate for oscillators. A variety of his ideas have been coded in a variety of languages. Often he starts by trying to isolate the cyclical component from any trending component.

Cynthia Kase has some interesting ideas like the Kase Peak Oscillator.
BlowFish is offline  
Reply With Quote
Old 06-04-2009, 06:32 AM   #3

cunparis's Avatar

Join Date: May 2008
Location: Paris
Posts: 154
Ignore this user

Thanks: 238
Thanked 45 Times in 25 Posts

Re: How to Make a Data into an Oscillator?

Quote:
Originally Posted by BlowFish »
You might want to look at John Ehlers work. he approaches things from a signal processing point of view which is quite appropriate for oscillators. A variety of his ideas have been coded in a variety of languages. Often he starts by trying to isolate the cyclical component from any trending component.

Cynthia Kase has some interesting ideas like the Kase Peak Oscillator.

Hi, thanks for your reply. It's a coincidence that you mention these two because I have recently been looking at both of them.

I am currently playing with Ehler's sine wave but I thought it only applied to price. Could it apply to other data too?

I have also demo'd the kase oscillator. It's great for detecting divergences but I couldn't get her method (from her book) to be profitable, nor could I get her kase easy entry system to be profitable. I concluded that it's good for detecting divergence which can be warning signs but often I found a strong trend and I'd get out because of the divergence only to watch it continue on for a while. Price often does pullback after a divergence but often it resumes. So I wasn't able to find a way to incorporate it into my trading.

Also on the kase peak, can it be applied to non-price data? I didn't try this.

In summary, I'm looking for a way to take data and make my own oscillator. For example the trin goes from say near 0 to 2. I'd like to make it 0 to 100 and have it centered at zero. Same for pc ratio, a/d line, etc.
cunparis is offline  
Reply With Quote
Old 06-04-2009, 07:10 AM   #4

BlowFish's Avatar

Join Date: Mar 2007
Location: In Da House
Posts: 3,292
Ignore this user

Thanks: 129
Thanked 1,054 Times in 702 Posts

Re: How to Make a Data into an Oscillator?

Brief answer, about to go for lunch. Any data series really, Ehlers stuff is largely influenced by signal processing.
BlowFish is offline  
Reply With Quote
Old 06-04-2009, 07:46 AM   #5

Join Date: Nov 2007
Posts: 90
Ignore this user

Thanks: 13
Thanked 32 Times in 21 Posts

Re: How to Make a Data into an Oscillator?

Quote:
Originally Posted by cunparis »
I'd like to make an oscillator of the put/call ratio. One could say it's already an oscillator but it's not centered around zero and it often leans one way or the other for long periods of time.

Another example is the TICK index. I'd like to come up with an oscillator for that.

If you want an "indicator" that can only vary within a certain range (e.g. 0-100) you can always use the stochastic formula as a basis.
As input you would use e.g. the put/call ratio or the tick value (instead of price, as usually done).


But: Please think if it is wise to do so.

In my view it is important to get as much information as you can from the data you have access to.
If you notice that P/C ratio is "leaning" then this is valuable information which should not be eliminated by a formula that forces values into an artificial range. For me it is clearly the task to get as much (valuable) information as possible not to cut it down.
uexkuell is offline  
Reply With Quote
The Following User Says Thank You to uexkuell For This Useful Post:
cunparis (06-05-2009)
Old 06-04-2009, 08:56 AM   #6

Tams's Avatar

Join Date: Sep 2008
Location: Geelong
Posts: 3,779
Ignore this user

Thanks: 2,084
Thanked 1,474 Times in 912 Posts

Re: How to Make a Data into an Oscillator?

Quote:
Originally Posted by cunparis »
Hi, this is one of my first posts here but I've been lurking for a while. I'm a professional software develop (Java) and I've been developing trading systems and tools, both automated and discretionary. However I'm not that good at math.

I have some data that I'd like to turn into an oscillator but I'm not sure how. Ideally I'd like my oscillator to go between 0 and 100 if possible but that's not totally necessary. I've been playing around with the stochastic formula and also MACD. It seems those are the most used to make oscillators.

To take a couple examples, I'd like to make an oscillator of the put/call ratio. One could say it's already an oscillator but it's not centered around zero and it often leans one way or the other for long periods of time.

Another example is the TICK index. I'd like to come up with an oscillator for that.

Another example is I'd like to see if I can use the overnight range (using ES for this example) to make something useful. I have no idea if this will work but I'd like to give it a shot.

I can handle the coding, so if you feel like sharing some ideas I'll code it up and post the code & charts for everyone's benefits. I'm hoping we can come up with something useful together.


fit a moving average on the basis...
then the data can oscillate around it.
Tams is offline  
Reply With Quote
Old 06-05-2009, 05:57 AM   #7

cunparis's Avatar

Join Date: May 2008
Location: Paris
Posts: 154
Ignore this user

Thanks: 238
Thanked 45 Times in 25 Posts

Re: How to Make a Data into an Oscillator?

Quote:
Originally Posted by uexkuell »
But: Please think if it is wise to do so.
For me it is clearly the task to get as much (valuable) information as possible not to cut it down.
This wasn't the answer I was looking for but after playing around with various combinations of stochastics and bollinger bands, I have to agree with you that the pc ratio data has more information in it than the oscillators I made. The only problem is I wanted to do some backtests to test out some ideas and for that oscillators are useful.
cunparis is offline  
Reply With Quote
Old 06-09-2009, 04:05 PM   #8

cunparis's Avatar

Join Date: May 2008
Location: Paris
Posts: 154
Ignore this user

Thanks: 238
Thanked 45 Times in 25 Posts

Re: How to Make a Data into an Oscillator?

I had a few things done and tradestation crashed and the stupid thing lost everything I've done since my last backup which was Friday. (What a POS!!!). At least Ninjatrader kept the source code in ascii files on the PC so they could never get corrupted. Anyway, the stuff I made was simple so I'll redo it and if there is interest I'll post what I come up with...
cunparis is offline  
Reply With Quote

Reply

Thread Tools
Display Modes Help Others By Rating This Thread
Help Others By Rating This Thread:


Similar Threads
Thread Thread Starter Forum Replies Last Post
VWAP Oscillator in EasyLanguage Tresor Coding Forum 8 01-27-2011 02:19 PM
DeMark Oscillator Tams Trading Indicators 2 05-27-2009 04:27 PM
Looking for Oscillator That Does NOT Diverge Tresor Beginners Forum 27 12-04-2008 06:59 PM
AO Oscillator cstar Beginners Forum 1 11-27-2008 04:24 AM
McCullough Z Oscillator kuhaku Coding Forum 0 10-04-2008 01:31 PM

All times are GMT -4. The time now is 01:18 PM.
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
CS to VB integration by DeskLancer
©2006-2011 Traders Laboratory, All Rights Reserved.