Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
7 registered members (clonman, TipmyPip, Niels, dBc, Ed_Love, 3run, 1 invisible), 18,869 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 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: 28,024
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 28,024
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 | 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