Dochian Channel Indicator

Here you can post and download custom indicators. PLEASE: Do not start topics unless you are posting your own indicator, they will be moved to appropriate section even if you do.

Moderator: admin

Re: Dochian Channel Indicator

Postby Coondawg71 » Sun Nov 24, 2013 6:00 am

Can we please request Alert Functions added to DNC V3 of this indicator upon breach of High Line, Low Line and Midline.

Thanks,

sjc
User avatar
Coondawg71
FXCodeBase: Graduate
 
Posts: 324
Joined: Sat Jan 15, 2011 11:45 am

Re: Dochian Channel Indicator

Postby Apprentice » Sun Nov 24, 2013 2:47 pm

Donchian Channel with Alert.lua Added (See Topmost post)
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 36258
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

Re: Dochian Channel Indicator

Postby mulligan » Wed Jan 29, 2014 5:02 pm

I'm using the DNC_V2. Would it be possible to add the style option to the center line of color up and color down?

Thanks
mulligan
FXCodeBase: Initiate
 
Posts: 150
Joined: Wed May 16, 2012 4:43 pm


Re: Dochian Channel Indicator

Postby mulligan » Thu Jan 30, 2014 11:00 am

Apologies for not being clear on the request. I was looking for color up as the indicator rises and color down as it goes down. Example, green as the center line goes up and red as it goes down.

Thanks.
mulligan
FXCodeBase: Initiate
 
Posts: 150
Joined: Wed May 16, 2012 4:43 pm

Re: Dochian Channel Indicator

Postby Apprentice » Sun Feb 02, 2014 4:03 am

Try This Version.
DNC_V2.lua
(4.42 KiB) Downloaded 2379 times
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 36258
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

Re: Dochian Channel Indicator

Postby mulligan » Sun Feb 16, 2014 6:51 pm

Thanks for the DNC_V2 with the up and down center line color option. With the additional neutral color, the line is predominantly neutral by the nature of the indicator. Is it possible to get a version with only the up and down without the neutral? It would be much clearer to read and follow with only up and down.
mulligan
FXCodeBase: Initiate
 
Posts: 150
Joined: Wed May 16, 2012 4:43 pm

Re: Dochian Channel Indicator

Postby Apprentice » Mon Feb 17, 2014 2:36 am

Try This Version.
DNC_V2.lua
(4.65 KiB) Downloaded 2804 times
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 36258
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

Re: Dochian Channel Indicator

Postby STS Trading » Wed Jan 21, 2015 4:34 am

Since yersterday I use Donchian Channel Indicator Version 3 (filename: DNC_V3.lua; post of Feb 09, 2011), cause I like the feature of the 25%- and 75%-lines. The middle-line is useless in my trading, so I deactivated it in the indicator setup, but this causes an error. In the update-function the dm-variable is used in case 25%- and 75%-lines are activated, but assigned with 0 in case the middle-line is deactivated.

So I added an else-part in the prepare-function as shown below:
Code: Select all
if (sm) then
    dm = instance:addStream("DM", core.Line, name .. ".DM", "M", instance.parameters.clrDM,  first)
    dm:setWidth(instance.parameters.widthDM);
    dm:setStyle(instance.parameters.styleDM);
else
    dm = instance:addInternalStream(0);
end


According to that change I revised the update-function as well and removed the if-statement:
Code: Select all
dm[period] = (du[period] + dn[period]) / 2;


Hopefuly it helps.

The revised version can be downloaded here:
DochianChannel.lua
(5.52 KiB) Downloaded 2316 times



Chris
Last edited by STS Trading on Wed Jan 21, 2015 6:24 am, edited 1 time in total.
STS Trading
 
Posts: 4
Joined: Wed Jan 21, 2015 4:22 am

Re: Dochian Channel Indicator

Postby Apprentice » Mon May 04, 2015 9:25 am

DNC.png

Projection option added to DNC.lua
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 36258
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

PreviousNext

Return to Custom Indicators

Who is online

Users browsing this forum: Bing [Bot] and 11 guests