NexusFi: Find Your Edge


Home Menu

 





Donchian cross


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one Fat Tails with 10 posts (61 thanks)
    2. looks_two GaryD with 4 posts (0 thanks)
    3. looks_3 Silvester17 with 2 posts (4 thanks)
    4. looks_4 tradermark2009 with 2 posts (0 thanks)
    1. trending_up 14,810 views
    2. thumb_up 67 thanks given
    3. group 12 followers
    1. forum 29 posts
    2. attach_file 15 attachments




 
Search this Thread

Donchian cross

  #11 (permalink)
 
Silvester17's Avatar
 Silvester17 
Columbus, OH
Market Wizard
 
Experience: None
Platform: NT 8, TOS
Trading: ES
Posts: 3,603 since Aug 2009
Thanks Given: 5,139
Thanks Received: 11,527


TempletonPeck View Post
@Fat Tails

I recently had a look at this indicator.

When I change the channel lines width only the upper channel line width changes. Is it possible to change the lower channel line width, too?

There is a different color than the ones for strong and weak uptrend where I put the arrow on the chart. Is it because I use the indicator with COBC=false?


if you add the following lines to the code (lines 93,94 and 95), the upper and lower lines should match.

 
Code
	protected override void OnStartUp()
		{
			if(selectedInput == DonchianInputX.UseHighLow)		
			{
				maxHigh = MAX(High,Period);
				minLow = MIN(Low,Period);
			}
			else
			{
				maxHigh = MAX(Close,Period);
				minLow = MIN(Close,Period);
			}
			donchianMinHigh = double.MaxValue;
			donchianMaxLow = double.MinValue;
			Plots[0].Pen.Width = plot0Width;
			Plots[0].PlotStyle = plot0Style;
			Plots[0].Pen.DashStyle = dash0Style;
			Plots[1].Pen.Width = plot1Width;
			Plots[1].PlotStyle = plot1Style;
			Plots[1].Pen.DashStyle = dash1Style;
			Plots[2].Pen.Width = plot1Width;
			Plots[2].PlotStyle = plot1Style;
			Plots[2].Pen.DashStyle = dash1Style;
		}

Reply With Quote

Can you help answer these questions
from other members on NexusFi?
What broker to use for trading palladium futures
Commodities
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
MC PL editor upgrade
MultiCharts
How to apply profiles
Traders Hideout
Cheap historycal L1 data for stocks
Stocks and ETFs
 
  #12 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Market Wizard
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
Posts: 9,888 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,103


TempletonPeck View Post
@Fat Tails

I recently had a look at this indicator.

When I change the channel lines width only the upper channel line width changes. Is it possible to change the lower channel line width, too?

There is a different color than the ones for strong and weak uptrend where I put the arrow on the chart. Is it because I use the indicator with COBC=false?


@TempletonPeck: That was a simple omission of 3 lines in OnStartUp(). I cannot tell you the reason for the color issue. Could you let me know, whether it is reproducible and what are the time stamps of those bars?

I wanted to update the indicator anyhow. I have now slightly changed the lables. What I called a weak downtrend (actually I wanted to say weakening downtrend) is now an early uptrend. I think it is easier to understand this way.

Actually the confirmed (main) trend changes from positive to negative, when the upper line comes clear from the maximum value of the lower line during the uptrend. The early trend changes to negative, when the upper line comes clear from the maximum value of the Donchian midline during the uptrend.

Rather than waiting for the confrimed trend to change, you can use the early trend and enter after the first pullback.

I have also extended the options to calculate Donchian Channels. You can now calculate them from High/Low, Close, Typical or Weighted. If you use the Typical Price, you will get faster and smoohter signals compared to those generated from the Close or High/Low. Below is a comparison and the updated indicator.

Feedback welcome.







Attached Files
Elite Membership required to download: DonchianChannelX2.zip
Reply With Quote
  #13 (permalink)
 
TempletonPeck's Avatar
 TempletonPeck 
Germany
 
Experience: Beginner
Platform: NinjaTrader
Broker: Mirus Futures/Zen-Fire
Posts: 200 since Feb 2010
Thanks Given: 1,138
Thanks Received: 202



Fat Tails View Post
@TempletonPeck: That was a simple omission of 3 lines in OnStartUp(). I cannot tell you the reason for the color issue. Could you let me know, whether it is reproducible and what are the time stamps of those bars?

I wanted to update the indicator anyhow. I have now slightly changed the lables. What I called a weak downtrend (actually I wanted to say weakening downtrend) is now an early uptrend. I think it is easier to understand this way.

Actually the confirmed (main) trend changes from positive to negative, when the upper line comes clear from the maximum value of the lower line during the uptrend. The early trend changes to negative, when the upper line comes clear from the maximum value of the Donchian midline during the uptrend.

Rather than waiting for the confrimed trend to change, you can use the early trend and enter after the first pullback.

I have also extended the options to calculate Donchian Channels. You can now calculate them from High/Low, Close, Typical or Weighted. If you use the Typical Price, you will get faster and smoohter signals compared to those generated from the Close or High/Low. Below is a comparison and the updated indicator.

Feedback welcome.

Thanks for the update!

The color issue only appears sometimes in realtime when used with COBC=false

Here is a quick example: CL 2Range 17:12:35.

When you reload the chart or apply the indicator again the issue is solved.




Reply With Quote
  #14 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Market Wizard
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
Posts: 9,888 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,103


TempletonPeck View Post
Thanks for the update!

The color issue only appears sometimes in realtime when used with COBC=false

Here is a quick example: CL 2Range 17:12:35.

When you reload the chart or apply the indicator again the issue is solved.

I remember the problem now, only occurs with COBC = false, will fix it later today, when I am back on my main PC... becky:

Reply With Quote
Thanked by:
  #15 (permalink)
Eduard
Estonia
 
Posts: 14 since Nov 2010
Thanks Given: 65
Thanks Received: 4

Maybe do someone have d.channel that colors only candles?

Like in Supertrend TS indicator


Reply With Quote
  #16 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Market Wizard
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
Posts: 9,888 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,103


TempletonPeck View Post
Thanks for the update!

The color issue only appears sometimes in realtime when used with COBC=false

Here is a quick example: CL 2Range 17:12:35.

When you reload the chart or apply the indicator again the issue is solved.


@TempletonPeck:

I have now replaced the indicator file in post #12. Large parts of the indicator are changed to comply with COBC = false. Please let me know any observations.

By the way, the bug affected at least 6 other indicators, which I have coded, but nobody ever complained!

Reply With Quote
  #17 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Market Wizard
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
Posts: 9,888 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,103


Eduard View Post
Maybe do someone have d.channel that colors only candles?

Like in Supertrend TS indicator



Added paintbars and an option to remove the channel lines, in case that you just want to see the paintbars. Improved code efficiency as well.



Attached Files
Elite Membership required to download: DonchianChannelX3.zip
Reply With Quote
  #18 (permalink)
Eduard
Estonia
 
Posts: 14 since Nov 2010
Thanks Given: 65
Thanks Received: 4

Oh!, Vielen Dank

Reply With Quote
  #19 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Market Wizard
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
Posts: 9,888 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,103

I have made a minor update of the Donchian Channel indicator.

The new version allows for displacement and will correctly move the colors along with the displaced plot.


Reply With Quote
  #20 (permalink)
 
Big Mike's Avatar
 Big Mike 
Manta, Ecuador
Site Administrator
Developer
Swing Trader
 
Experience: Advanced
Platform: Custom solution
Broker: IBKR
Trading: Stocks & Futures
Frequency: Every few days
Duration: Weeks
Posts: 50,463 since Jun 2009
Thanks Given: 33,236
Thanks Received: 101,658


Notifications sent.

Mike

We're here to help: just ask the community or contact our Help Desk

Quick Links: Change your Username or Register as a Vendor
Searching for trading reviews? Review this list
Lifetime Elite Membership: Sign-up for only $149 USD
Exclusive money saving offers from our Site Sponsors: Browse Offers
Report problems with the site: Using the NexusFi changelog thread
Follow me on Twitter Visit my NexusFi Trade Journal Reply With Quote




Last Updated on August 5, 2023


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts