Welcome to NexusFi: the best trading community on the planet, with over 150,000 members Sign Up Now for Free
Genuine reviews from real traders, not fake reviews from stealth vendors
Quality education from leading professional traders
We are a friendly, helpful, and positive community
We do not tolerate rude behavior, trolling, or vendors advertising in posts
We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community. It's free for basic access, or support us by becoming an Elite Member -- see if you qualify for a discount below.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
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.
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 ;
Can you help answer these questions from other members on NexusFi?
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.
Functions typically need to always return "something", so for the Donchian code above, simply add...
...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.