Gamestudio Links
Zorro Links
Newest Posts
Data from CSV not parsed correctly
by EternallyCurious. 04/25/24 10:20
Trading Journey
by howardR. 04/24/24 20:04
M1 Oversampling
by Petra. 04/24/24 10:34
Zorro FIX plugin - Experimental
by flink. 04/21/24 07:12
Scripts not found
by juergen_wue. 04/20/24 18:51
zorro 64bit command line support
by 7th_zorro. 04/20/24 10:06
StartWeek not working as it should
by jcl. 04/20/24 08:38
folder management functions
by VoroneTZ. 04/17/24 06:52
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
5 registered members (AndrewAMD, TipmyPip, VoroneTZ, Quad, 1 invisible), 688 guests, and 11 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Mega_Rod, EternallyCurious, howardR, 11honza11, ccorrea
19048 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 | 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