Awesome Oscillator  [SOLVED]

Questions about MultiCharts and user contributed studies.
fernando43611
Posts: 33
Joined: 12 Mar 2015
Has thanked: 4 times

Awesome Oscillator

Postby fernando43611 » 24 Mar 2015

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!

User avatar
MAtricks
Posts: 789
Joined: 09 Apr 2012
Has thanked: 286 times
Been thanked: 288 times

Re: Awesome Oscillator

Postby MAtricks » 24 Mar 2015

Please post the code for your indicator.

fernando43611
Posts: 33
Joined: 12 Mar 2015
Has thanked: 4 times

Re: Awesome Oscillator

Postby fernando43611 » 24 Mar 2015

Please post the code for your indicator.
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 wrong

User avatar
MAtricks
Posts: 789
Joined: 09 Apr 2012
Has thanked: 286 times
Been thanked: 288 times

Re: Awesome Oscillator

Postby MAtricks » 25 Mar 2015

There are many versions of the Awesome Oscillator. Find the one you'd like to use and we can convert it into signals.

fernando43611
Posts: 33
Joined: 12 Mar 2015
Has thanked: 4 times

Re: Awesome Oscillator

Postby fernando43611 » 25 Mar 2015

There are many versions of the Awesome Oscillator. Find the one you'd like to use and we can convert it into signals.
That would be the Chaos Awesome Oscillator, built-in in Multicharts, the code that shows is the following:


[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")

User avatar
MAtricks
Posts: 789
Joined: 09 Apr 2012
Has thanked: 286 times
Been thanked: 288 times

Re: Awesome Oscillator  [SOLVED]

Postby MAtricks » 25 Mar 2015

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:

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 ;

fernando43611
Posts: 33
Joined: 12 Mar 2015
Has thanked: 4 times

Re: Awesome Oscillator

Postby fernando43611 » 25 Mar 2015

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.
well, it would be nice to have 2 separate set of signals:

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!

fernando43611
Posts: 33
Joined: 12 Mar 2015
Has thanked: 4 times

Re: Awesome Oscillator

Postby fernando43611 » 25 Mar 2015

haha, I just read you already posted a code for AO crossin over 0, thanks!!


Return to “MultiCharts”