Hi, I need help in creating a signal code using the awesome oscillator:
1. Buy when the AO is green.
2. Sell short when the AO is red.
thank you!
Awesome Oscillator [SOLVED]
-
- Posts: 33
- Joined: 12 Mar 2015
- Has thanked: 4 times
Re: Awesome Oscillator
don't have anything yet, but I guess is something close to the MACD signal, Im new to this kind of coding so I could be wrongPlease post the code for your indicator.
-
- Posts: 33
- Joined: 12 Mar 2015
- Has thanked: 4 times
Re: Awesome Oscillator
That would be the Chaos Awesome Oscillator, built-in in Multicharts, the code that shows is the following:There are many versions of the Awesome Oscillator. Find the one you'd like to use and we can convert it into signals.
[LegacyColorValue = true];
Vars: var0(0),var1(0);
var0=Average((h+l)/2,5)-Average((h+l)/2,34);
var1=var0-Average(var0,5);
Plot3( 0, "ZeroLine" ) ;
if currentbar>=1 then
if var0>var0[1] then plot1(var0,"+AO")
else plot2(var0,"-AO")
Re: Awesome Oscillator [SOLVED]
Wow, MC. The code that comes with the platform should be a good example, not a mess with unused lines.
Fernando,
What would your signals be? Buy on green? Buy when AO crosses over 0?
You must be descriptive and detailed with any future coding requests. This is literally a 45 second project... if I knew what you wanted.
This is your code for crossing over Zero:
Fernando,
What would your signals be? Buy on green? Buy when AO crosses over 0?
You must be descriptive and detailed with any future coding requests. This is literally a 45 second project... if I knew what you wanted.
This is your code for crossing over Zero:
Code: Select all
INPUTS:
AOLength( 34 ) ;
VARIABLES:
AO( 0 ) ;
AO = Average((H+L)/2,5)-Average((H+L)/2, AOLength) ;
if AO crosses over 0 then buy this bar ;
if AO crosses under 0 then sellshort this bar ;
-
- Posts: 33
- Joined: 12 Mar 2015
- Has thanked: 4 times
Re: Awesome Oscillator
well, it would be nice to have 2 separate set of signals:What would your signals be? Buy on green? Buy when AO crosses over 0?
You must be descriptive and detailed with any future coding requests. This is literally a 45 second project... if I knew what you wanted.
1) Buy on green, sell on red
Sell short on red, cover on green
2) Buy when AO crosses above 0 line, sell when AO crosses below 0
Sell short when AO crosses below 0 line, cover when AO crosses above 0
thank you!
-
- Posts: 33
- Joined: 12 Mar 2015
- Has thanked: 4 times