Gamestudio Links
Zorro Links
Newest Posts
Blobsculptor tools and objects download here
by NeoDumont. 03/28/24 03:01
Issue with Multi-Core WFO Training
by aliswee. 03/24/24 20:20
Why Zorro supports up to 72 cores?
by Edgar_Herrera. 03/23/24 21:41
Zorro Trader GPT
by TipmyPip. 03/06/24 09:27
VSCode instead of SED
by 3run. 03/01/24 19:06
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (degenerate_762), 1,098 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
sakolin, rajesh7827, juergen_wue, NITRO_FOREVER, jack0roses
19043 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
Accelerator Oscillator & Awesome Oscillator #416338
01/30/13 15:12
01/30/13 15:12
Joined: Jan 2013
Posts: 26
Italy
M
Maruska Offline OP
Newbie
Maruska  Offline OP
Newbie
M

Joined: Jan 2013
Posts: 26
Italy
Where are AC & AO indicators? Zorro missed them?

Re: Accelerator Oscillator & Awesome Oscillator [Re: Maruska] #416364
01/30/13 16:09
01/30/13 16:09
Joined: Jul 2000
Posts: 27,977
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,977
Frankfurt
Zorro has the 150 most important indicators, but there are many, many more. We're certainly not going to implement them all, as most indicators are useless anyway.

But if you want a certain indicator, find out its algorithm and just try implementing it yourself. With some experience you can implement a simple indicator in 2 minutes. I'll help you. You can post your code here and I'll check and fix it if necessary.

Re: Accelerator Oscillator & Awesome Oscillator [Re: jcl] #416365
01/30/13 16:14
01/30/13 16:14
Joined: Jan 2013
Posts: 26
Italy
M
Maruska Offline OP
Newbie
Maruska  Offline OP
Newbie
M

Joined: Jan 2013
Posts: 26
Italy
Ok,
I'll try to implement them.

These are the formulas:
MEDIAN PRICE = (HIGH+LOW)/2
AO = SMA(MEDIAN PRICE, 5)-SMA(MEDIAN PRICE, 34)
AC = AO-SMA(AO, 5)

I've tried this in zorro but don't work:

vars median_price = series(MidPrice());
var ao = SMA(median_price,5)-SMA(median_price,34);
var ac = ao-SMA(ao, 5);

Last edited by Maruska; 01/30/13 16:21.
Re: Accelerator Oscillator & Awesome Oscillator [Re: Maruska] #416370
01/30/13 17:46
01/30/13 17:46
Joined: Jul 2000
Posts: 27,977
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,977
Frankfurt
This is not too bad. It's almost right, only two mistakes:

vars median_price = series(MidPrice());

There is no such thing as "MidPrice()". Why don't you use your own formula above?

var ac = ao-SMA(ao, 5);

Correct, only SMA - like all indicators - needs a series and not a var.

Re: Accelerator Oscillator & Awesome Oscillator [Re: jcl] #416386
01/30/13 20:44
01/30/13 20:44
Joined: Jan 2013
Posts: 26
Italy
M
Maruska Offline OP
Newbie
Maruska  Offline OP
Newbie
M

Joined: Jan 2013
Posts: 26
Italy
I took the wrong indicator MidPrice. It should be MedPrice.
As the manual says:

MedPrice(): var
Median Price. Simply (High+Low)/2 over only one bar.

About SMA that needs a series but I have used a var. Ok but how can I get a series result?

Something like this?
vars ao = series(SMA(median_price,5))-series(SMA(median_price,34));

Re: Accelerator Oscillator & Awesome Oscillator [Re: Maruska] #416409
01/31/13 08:35
01/31/13 08:35
Joined: Jul 2000
Posts: 27,977
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,977
Frankfurt
You can not subtract series, but you can subtract numbers.

vars ao = series(SMA(median_price,5) - SMA(median_price,34));
var ac = ao[0] - SMA(ao,5);

or

var ao = SMA(median_price,5) - SMA(median_price,34);
var ac = ao - SMA(series(ao),5);

Re: Accelerator Oscillator & Awesome Oscillator [Re: jcl] #416410
01/31/13 08:51
01/31/13 08:51
Joined: Jan 2013
Posts: 26
Italy
M
Maruska Offline OP
Newbie
Maruska  Offline OP
Newbie
M

Joined: Jan 2013
Posts: 26
Italy
Ok, I understand.

And If I want also ac as a series:

vars ac = series(ao - SMA(ao,5));

this is correct?

Last edited by Maruska; 01/31/13 08:51.
Re: Accelerator Oscillator & Awesome Oscillator [Re: Maruska] #416413
01/31/13 09:41
01/31/13 09:41
Joined: Jul 2000
Posts: 27,977
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,977
Frankfurt
Almost. If you use the first method, it would be:

vars ac = series(ao[0] - SMA(ao,5));

If ao is already a series, ao[0] is its current value.

Re: Accelerator Oscillator & Awesome Oscillator [Re: jcl] #416420
01/31/13 11:02
01/31/13 11:02
Joined: Jan 2013
Posts: 26
Italy
M
Maruska Offline OP
Newbie
Maruska  Offline OP
Newbie
M

Joined: Jan 2013
Posts: 26
Italy
Ok, thank you very much!

Re: Accelerator Oscillator & Awesome Oscillator [Re: Maruska] #422857
05/18/13 23:21
05/18/13 23:21
Joined: Nov 2012
Posts: 19
Texas, US
D
deweymcg Offline
Newbie
deweymcg  Offline
Newbie
D

Joined: Nov 2012
Posts: 19
Texas, US
a question I have: some strategies are based on whether the AO or AC is above 0, others are based on what color it is. How would you call one versus the other based on the strategy you are trying to test?

I assume the value would show whether it was above or below 0 but how do you know what color it would be on the chart?

Last edited by deweymcg; 05/18/13 23:25.
Page 1 of 2 1 2

Moderated by  Petra 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1