NexusFi: Find Your Edge


Home Menu

 





Donchian Channel for EasyLanguage


Discussion in EasyLanguage Programming

Updated
      Top Posters
    1. looks_one Shaban with 4 posts (0 thanks)
    2. looks_two themeantrader with 3 posts (0 thanks)
    3. looks_3 canucck with 3 posts (1 thanks)
    4. looks_4 Big Mike with 2 posts (17 thanks)
      Best Posters
    1. looks_one Big Mike with 8.5 thanks per post
    2. looks_two olobay with 1.5 thanks per post
    3. looks_3 Fonz with 1.5 thanks per post
    4. looks_4 canucck with 0.3 thanks per post
    1. trending_up 21,989 views
    2. thumb_up 24 thanks given
    3. group 18 followers
    1. forum 26 posts
    2. attach_file 6 attachments




 
Search this Thread

Donchian Channel for EasyLanguage

  #21 (permalink)
themeantrader
Towcester, United Kingdom
 
Posts: 3 since Feb 2021
Thanks Given: 0
Thanks Received: 0

Hi, I'm new to Easylanguage and struggling with programming the Donchian (or Price Channel) as I need it.

I'm looking to either add the displace functionality to the Donchian code I already have (further down in this page), or adding the MEAN to the existing code for the Price Channel. I need the MEAN and the displace option and neither the Donchian or Price Channel have both.

I'm guessing it's easier to add the MEAN to the Price Channel code (below). I've added a var2 and plot3 but can't get anything to compile. Any help very gratefully appreciated.

Thanks
TMT


inputs: Length( 20 ), Displace( 0 ) ;
variables: var0( 0 ), var1( 0 ) ;

var0 = Lowest( Low, Length )[1] ;
var1 = Highest( High, Length )[1] ;

condition1 = Displace >= 0 or CurrentBar > AbsValue( Displace ) ;
if condition1 then
begin
Plot1[Displace]( var1, "UpperBand" ) ;
Plot2[Displace]( var0, "LowerBand" ) ;
Plot3 ((var1 +var0)/2, "MEAN" );

if Displace <= 0 then
begin
condition1 = Low crosses under var0 ;
if condition1 then
Alert( "Price making new low" ) ;
condition1 = High crosses over var1 ;
if condition1 then
Alert( "Price making new high" ) ;
end ;
end ;

Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Exit Strategy
NinjaTrader
MC PL editor upgrade
MultiCharts
REcommedations for programming help
Sierra Chart
Pivot Indicator like the old SwingTemp by Big Mike
NinjaTrader
Better Renko Gaps
The Elite Circle
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Spoo-nalysis ES e-mini futures S&P 500
29 thanks
Just another trading journal: PA, Wyckoff & Trends
25 thanks
Tao te Trade: way of the WLD
24 thanks
Bigger Wins or Fewer Losses?
23 thanks
GFIs1 1 DAX trade per day journal
17 thanks
  #22 (permalink)
Shaban
Turin + Italy
 
Posts: 194 since Feb 2020
Thanks Given: 24
Thanks Received: 129

Hi,

I tried to insert the Function that I found in this thread, but Tradestation reports this error:
"A value was never assigned to user function"

if someone can solve the problem, I thank you in advance.

................................................................

Function:

// Ported to MultiCharts by Big Mike, https://nexusfi.com/

// Dec 23 2010



inputs:

period (NumericSimple),

myMid (NumericRef),

myUpper (NumericRef),

myLower (NumericRef);



myUpper = Highest(H, period);

myLower = Lowest(L, period);

myMid = (myUpper + myLower) / 2;

--------------------------------------------------------------------

[img]https://i.postimg.cc/NjmDMrvF/Donchian-Channel-errore-Funzione.jpg[/img]

Reply With Quote
  #23 (permalink)
 
Fonz's Avatar
 Fonz 
Miami, Fl
 
Experience: Advanced
Platform: Tradestation, Jigsaw
Trading: Futures
Posts: 50 since Feb 2012
Thanks Given: 24
Thanks Received: 64


Here is what I have.
Hope this helps.

Attached Files
Elite Membership required to download: DONCHIAN CHANNEL.ELD
Reply With Quote
Thanked by:
  #24 (permalink)
Shaban
Turin + Italy
 
Posts: 194 since Feb 2020
Thanks Given: 24
Thanks Received: 129


Fonz View Post
Here is what I have.
Hope this helps.

Thank you, but unfortunately Tradestation 8.2 cannot read the .ELD files of the higher versions (9 and 10, see image).
If you can insert the Function of the Donchian Channel in text format (txt).
Thank you very much.

[img]https://i.postimg.cc/6q6rVGgq/Donchian-Channel-per-Tradestation-10.jpg[/img]

Reply With Quote
  #25 (permalink)
 
Fu510n's Avatar
 Fu510n 
Suffield, CT
 
Experience: Advanced
Platform: MC, TS, Python, Rust
Broker: IB, IQFeed, TS, Kraken
Trading: ES, NQ, RTY, YM, CL, RB, 6E
Frequency: Several times daily
Duration: Seconds
Posts: 144 since Oct 2009
Thanks Given: 902
Thanks Received: 143


Shaban View Post
Hi,

I tried to insert the Function that I found in this thread, but Tradestation reports this error:
"A value was never assigned to user function"

if someone can solve the problem, I thank you in advance.

................................................................

Function:

// Ported to MultiCharts by Big Mike, https://nexusfi.com/

// Dec 23 2010



inputs:

period (NumericSimple),

myMid (NumericRef),

myUpper (NumericRef),

myLower (NumericRef);



myUpper = Highest(H, period);

myLower = Lowest(L, period);

myMid = (myUpper + myLower) / 2;

--------------------------------------------------------------------

[img]https://i.postimg.cc/NjmDMrvF/Donchian-Channel-errore-Funzione.jpg[/img]

Functions typically need to always return "something", so for the Donchian code above, simply add...
 
Code
DonchianChannel = myMid;
...to the end of the code (assuming the name of the function is "DonchianChannel"; if not, simply replace the variable name with the name of the function itself).

The 3 (NumericRef) output variables are generally what you're using anyway so this is just to satisfy the compiler.

Follow me on Twitter Reply With Quote
  #26 (permalink)
Shaban
Turin + Italy
 
Posts: 194 since Feb 2020
Thanks Given: 24
Thanks Received: 129

For Fu510n: thank you very much.

Here there is a Trading System in Easylanguage with the Donchian Channel:

TRADERS’ TIPS - February 2014

Reply With Quote
  #27 (permalink)
Shaban
Turin + Italy
 
Posts: 194 since Feb 2020
Thanks Given: 24
Thanks Received: 129


Fonz View Post
Here is what I have.
Hope this helps.

For Fonz: You have a P.M.

Reply With Quote




Last Updated on June 29, 2021


© 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