Gamestudio Links
Zorro Links
Newest Posts
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/20/24 01:28
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (AndrewAMD), 636 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Bollinger Bands #423445
05/29/13 22:23
05/29/13 22:23
Joined: Apr 2013
Posts: 107
UK
G
Geek Offline OP
Member
Geek  Offline OP
Member
G

Joined: Apr 2013
Posts: 107
UK
Quote:
vars Close = series(priceClose());
vars Price = series(price());

var *BBAnd1Upper = series(rRealUpperBand);
var *BBAnd1Lower = series(rRealLowerBand);


if (priceClose() <= (rRealLowerBand))
enterLong();

else if (priceClose() >= (rRealUpperBand))
enterShort();



I am just testing out the Bollinger Bands indicators, and the above part of the code seems to work.

But I am not sure if there something missing from this code? Such as the below, which I found from an older post on this forum..

Quote:
BBands(Close,19,1,1,MAType_SMA));


I have tried to put in this part above but it gives me a syntax error... Just want to make sure that I am going about this correctly??

Cheers.

Re: Bollinger Bands [Re: Geek] #423461
05/30/13 10:22
05/30/13 10:22
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
Yes, you must call the BBands function before you can use rRealLowerBand or rRealUpperBand. See the indicators.c example.

Re: Bollinger Bands [Re: jcl] #423937
06/08/13 13:03
06/08/13 13:03
Joined: Apr 2013
Posts: 107
UK
G
Geek Offline OP
Member
Geek  Offline OP
Member
G

Joined: Apr 2013
Posts: 107
UK
Thank you, this is now working.


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