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
6 registered members (TipmyPip, Niels, dBc, Ed_Love, 3run, 1 invisible), 17,577 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
Something wrong with DChannel ? #467393
07/31/17 15:31
07/31/17 15:31
Joined: Feb 2017
Posts: 24
sodiumchloride Offline OP
Newbie
sodiumchloride  Offline OP
Newbie

Joined: Feb 2017
Posts: 24
i tried this
Code:
// DC Test
function run()
{
	set(PLOTNOW);
	StartDate = 20170722;
	BarPeriod = 1;
	vars Price = series(price());
	plot("DC",DChannel(20),0,RED);
}


and it is only plotting the upper line. i was then searching for "DChannel" in Zorro folder and in indicators.c i found this
@Line 312:
Code:
// Donchian Channel
var DChannel(int Period)
{
	rRealUpperBand = HH(Period,0);
	rRealLowerBand = LL(Period,0);
	return rRealUpperBand;
}


looks like the return of the lower band is missing? i hope someone can enlighten me. ty

Re: Something wrong with DChannel ? [Re: sodiumchloride] #467397
07/31/17 18:00
07/31/17 18:00
Joined: Feb 2015
Posts: 652
Milano, Italy
M
MatPed Offline
User
MatPed  Offline
User
M

Joined: Feb 2015
Posts: 652
Milano, Italy
hi,
you should first call DChannel and than plot rRealUpperBand and rRealLowerBand.

Ciao

Last edited by MatPed; 07/31/17 18:00.
Re: Something wrong with DChannel ? [Re: MatPed] #467410
08/01/17 10:52
08/01/17 10:52
Joined: Feb 2017
Posts: 24
sodiumchloride Offline OP
Newbie
sodiumchloride  Offline OP
Newbie

Joined: Feb 2017
Posts: 24
fixed it, tyvm

Code:
// DC Test
function run()
{
	set(PLOTNOW);
	StartDate = 20170722;
	BarPeriod = 1;
	vars Price = series(price());
	DChannel(20);
	plot("DC UP",rRealUpperBand,BAND1,RED);
	plot("DC DOWN",rRealLowerBand,BAND2,GREY);
}



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