Spread Oscillator

Here you can post and download custom indicators. PLEASE: Do not start topics unless you are posting your own indicator, they will be moved to appropriate section even if you do.

Moderator: admin

Spread Oscillator

Postby Apprentice » Fri May 03, 2013 4:14 am

Spread Oscillator.png

Ratio = (First Instrument / Second Instrument)*100
Spread Oscillator = Long MA of Ratio - Short MA of Ratio
Spread Oscillator.lua
(4.65 KiB) Downloaded 1246 times

Spread Oscillator with Normalization.lua
(5.9 KiB) Downloaded 1102 times

MT4/Mq4 version.
viewtopic.php?f=38&t=64942&p=113699#p113699
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 36435
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia


Re: Spread Oscillator

Postby Jeffreyvnlk » Tue May 07, 2013 7:13 am

Apprentice wrote:Zero line Added.


Thanks
Jeffreyvnlk
FXCodeBase: Graduate
 
Posts: 302
Joined: Wed Apr 11, 2012 2:17 pm

Normalization

Postby Jeffreyvnlk » Thu May 23, 2013 3:55 pm

Is there a way for normalization this Spread Oscilator for 3 year ? Like constructing of COT index
Subtracting by exponential moving averages is appreciated
Jeffreyvnlk
FXCodeBase: Graduate
 
Posts: 302
Joined: Wed Apr 11, 2012 2:17 pm

Re: Spread Oscillator

Postby Apprentice » Fri May 24, 2013 3:31 am

Normalization algorithm is as follows.
Subtract exponential moving of spread from the spread?
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 36435
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

Re: Spread Oscillator

Postby Jeffreyvnlk » Wed May 29, 2013 12:49 pm

Apprentice wrote:Normalization algorithm is as follows.
Subtract exponential moving of spread from the spread?

Thank
Spread Oscillator = Long EMA of Ratio - Short EMA of Ratio
Jeffreyvnlk
FXCodeBase: Graduate
 
Posts: 302
Joined: Wed Apr 11, 2012 2:17 pm

Re: Spread Oscillator

Postby Jeffreyvnlk » Wed May 29, 2013 12:54 pm

Just like an orginal request, using EMA appreciated. And adding Zero line , please

Jeffreyvnlk wrote:It was appreciated if you could make this indicator called Spread Oscillator (SO):

A. Modified spread: dividing 1 instrument by 2rd and then multiplying by 100
B- Subtract a 5-period exponential moving average of A from a 15- period exponential moving average of A as well

Long and short 1st instrument when SO crossing above or below Zero line

Thanks in advance
Jeffreyvnlk
FXCodeBase: Graduate
 
Posts: 302
Joined: Wed Apr 11, 2012 2:17 pm

Re: Spread Oscillator

Postby Apprentice » Mon Jun 03, 2013 11:25 am

Normalization option added.
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 36435
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

Re: Spread Oscillator

Postby Jeffreyvnlk » Tue Jun 04, 2013 6:30 am

Perfect, you save me
Jeffreyvnlk
FXCodeBase: Graduate
 
Posts: 302
Joined: Wed Apr 11, 2012 2:17 pm

Re: Spread Oscillator

Postby Jeffreyvnlk » Sat Jul 06, 2013 3:08 am

Apprentice wrote:
Spread Oscillator.png

Ratio = (First Instrument / Second Instrument)*100
Spread Oscillator = Long MA of Ratio - Short MA of Ratio
Spread Oscillator.lua

Spread Oscillator with Normalization.lua


Your Spread Oscillator based on moving average was great.
May I propose another method which based on percentage change movements as following:
===============
Input: Length(20)
Value1(( C/C[Length])- C Data2/C[Length] Data2))*100;
===================
I called it as Spread Momentum (SM) and it could be easier to use for trading. Use 2 levels for extremes and Zero line. It would be fantastic if you could paint the price bars when SM reaching extremes
Thanks
Jeffreyvnlk
FXCodeBase: Graduate
 
Posts: 302
Joined: Wed Apr 11, 2012 2:17 pm

Next

Return to Custom Indicators

Who is online

Users browsing this forum: Baidu [Spider], Google [Bot] and 41 guests