Gamestudio Links
Zorro Links
Newest Posts
Trading Journey
by M_D. 04/26/24 20:22
Help with plotting multiple ZigZag
by M_D. 04/26/24 20:03
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
M1 Oversampling
by jcl. 04/26/24 11:12
Why Zorro supports up to 72 cores?
by jcl. 04/26/24 11:09
Eigenwerbung
by jcl. 04/26/24 11:08
MT5 bridge not working on MT5 v. 5 build 4160
by EternallyCurious. 04/25/24 20:49
Zorro FIX plugin - Experimental
by flink. 04/21/24 07:12
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
4 registered members (M_D, AndrewAMD, Quad, Ayumi), 806 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
wandaluciaia, Mega_Rod, EternallyCurious, howardR, 11honza11
19049 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 2 of 4 1 2 3 4
Re: Donchian Channel Indicator [Re: jcl] #409938
10/25/12 07:23
10/25/12 07:23
Joined: Sep 2012
Posts: 99
T
TankWolf Offline
Junior Member
TankWolf  Offline
Junior Member
T

Joined: Sep 2012
Posts: 99
Hmmm well that sucks, I guess I wont be able to use the strategies that rely on the +DI & -DI crossing then. It seems weird that those values havnt been stored when they are a standard part of the indicator when displayed on most trading platforms.

Re: Donchian Channel Indicator [Re: TankWolf] #409941
10/25/12 08:10
10/25/12 08:10
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
Well, according to the algorithm the +DI & -DI crossing is just the zero crossing of the DX, so you should be able to use those strategies. That's probably the reason why the TA-Lib author did not care to store +DI & -DI separately.

Re: Donchian Channel Indicator [Re: jcl] #409945
10/25/12 09:29
10/25/12 09:29
Joined: Sep 2012
Posts: 99
T
TankWolf Offline
Junior Member
TankWolf  Offline
Junior Member
T

Joined: Sep 2012
Posts: 99
Fair enough jcl thanks for your assistance as always. laugh

Re: Donchian Channel Indicator [Re: jcl] #409972
10/25/12 21:38
10/25/12 21:38
Joined: Oct 2012
Posts: 75
H
hughbriss Offline OP
Junior Member
hughbriss  Offline OP
Junior Member
H

Joined: Oct 2012
Posts: 75
Originally Posted By: jcl
Thanks for posting - and some remarks if you don't mind:

- The Donchian_Entry series is not needed, it is identical to DE_Up (same for Donchian_Exit)

- For the entry series, the default optimize value is below its lower limit.

- OptimalF is always 1 because you have FACTORS not set.

- CrossOver/Under checks the crossing of the price not with a curve, but with a horizontal line. I'm not sure if that is what you intended. If you want to compare the price curve with the Donchian curve delayed by 1 bar, use instead:

if(crossOver(Price_Close,DE_Up+1)...

DE_Up[1] = the Donchian up value at the previous bar
DE_Up+1 = the Donchian up series delayed by 1 bar.


If the DChannel series is not required then where would you specify the length of the Donchian Channel?

Re: Donchian Channel Indicator [Re: hughbriss] #409982
10/26/12 06:07
10/26/12 06:07
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
Its parameter specifies the DChannel length. You can find DChannel and all other indicators described in the manual under "Functions / Analysis / Indicators".

Re: Donchian Channel Indicator [Re: jcl] #409988
10/26/12 09:25
10/26/12 09:25
Joined: Oct 2012
Posts: 75
H
hughbriss Offline OP
Junior Member
hughbriss  Offline OP
Junior Member
H

Joined: Oct 2012
Posts: 75
Ok. In but in the original code he specifies DChannel as a series and you say that it is not required to do so and yet it is in that expression that he is defining the length of the channel.

Please could you just post a couple of lines of code of how you would set this indicator up? Thanks.

Re: Donchian Channel Indicator [Re: hughbriss] #409989
10/26/12 09:31
10/26/12 09:31
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
DChannel(length);
var *DE_Up = series(rRealUpperBand);
var *DE_Down = series(rRealLowerBand);

Re: Donchian Channel Indicator [Re: jcl] #409997
10/26/12 11:51
10/26/12 11:51
Joined: Oct 2012
Posts: 75
H
hughbriss Offline OP
Junior Member
hughbriss  Offline OP
Junior Member
H

Joined: Oct 2012
Posts: 75
That makes perfect sense. Thank you for your help.

Re: Donchian Channel Indicator [Re: hughbriss] #410019
10/26/12 19:42
10/26/12 19:42
Joined: Oct 2012
Posts: 75
H
hughbriss Offline OP
Junior Member
hughbriss  Offline OP
Junior Member
H

Joined: Oct 2012
Posts: 75
Hmmm, what if you want to use two different donch channels, one for entry and one for exit? I suppose you'd declare the DChannel, then define the variables using the rRealUpper/LowerBand and then declare the DChannel as the other length and then set up the other rReal bands? As long as they are in the right order it will do it sequentially correct?

So...

DChannel(55);
var *DE_Up = series(rRealUpperBand);
var *DE_Down = series(rRealLowerBand);

Dchannel(20);
var *DEX_Up = series(rRealUpperBand);
var *DEX_Down = series(rRealLowerBand);

I will have a go to implement this and if it doesn't work I'll go back to the original code and work with that.

Re: Donchian Channel Indicator [Re: hughbriss] #410020
10/26/12 20:03
10/26/12 20:03
Joined: Oct 2012
Posts: 75
H
hughbriss Offline OP
Junior Member
hughbriss  Offline OP
Junior Member
H

Joined: Oct 2012
Posts: 75
I came up with this but it doesn't appear to work which is a shame because logically in my head it looks fine.

function run()

{
BarPeriod = 1440;

var *ClosePrice = series(priceClose());
DChannel(55);

var *dcentup = series(rRealUpperBand);

var *dcentdown = series(rRealLowerBand);


DChannel(20);

var *dcexup = series(rRealUpperBand);

var *dcexdown = series(rRealLowerBand);

if(numLong = 0 && ClosePrice[0] > dcentup[0])
enterLong();
if(numShort = 0 && ClosePrice[0] < dcentdown[0])
enterShort();
if(numLong > 0 && ClosePrice[0] < dcexdown[0])
exitLong();
if(numShort > 0 && ClosePrice[0] > dcexup[0])
exitShort();
}

JCL, do you just get completely exasperated by people who can't work this stuff out even though there are a couple of lines in the manual that explain it all perfectly (to you)? :-)

I swear you could have written some of it in German and I would have had more chance of understanding it! I will get there though, I am determined to work this thing out.

Page 2 of 4 1 2 3 4

Moderated by  Petra 

Powered by UBB.threads™ PHP Forum Software 7.7.1