[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [amibroker] Re: AFL coding



PureBytes Links

Trading Reference Links

Hi Aron,
Many thanks.  I used the StaticVarSet option & it works like a dream. I have to hit refresh after any changes, but that's no problem.
Cheers
Brian
----- Original Message -----
From: Aron
Sent: Thursday, December 04, 2008 7:30 AM
Subject: Re: [amibroker] Re: AFL coding


Hi Folks,
And thanks for the responses. For the record, I don't need to pass arrays - just variables. For example, the ADX(N) is one of the indicators that I would like to display in a separate pane and vary N using Param (in the main pane), while watching how it affects ADX itself and the Buy and Sell arrows in the main pane.
Thanks
 
Brian


Hello Brian,
In case you have not resolved it yet by yourself, here are 2 ways to achieve it:

1. Using ATC (passing arrays):


//Main Pane
n =
Param( "pds", 1, 1, 100, 1 );
AddToComposite(n,"~parameters","c",1+2+128);

Plot(C, Date()+"",colorblack,ParamStyle("Style") | GetPriceStyle()) ;
Title="ADX pds: "  +n;


// Linked Pane
n=
Foreign("~parameters","Close");
n=
LastValue(n);
Plot(ADX(n), "ADX pds: "  +n, colorred) ;




2. Using Static Variables (passing variable):

//Main Pane
n = Param( "pds", 1, 1, 100, 1 );
StaticVarSet("parameters",n);

Plot(C, Date()+"",
colorblack,ParamStyle("Style") | GetPriceStyle()) ;
Title="ADX pds: "  +n;


// Linked Pane
n=
StaticVarGet("parameters");
Plot(ADX(n), "ADX pds: "  +n, colorRed) ;




__._,_.___

**** IMPORTANT ****
This group is for the discussion between users only.
This is *NOT* technical support channel.

*********************
TO GET TECHNICAL SUPPORT from AmiBroker please send an e-mail directly to
SUPPORT {at} amibroker.com
*********************

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

For other support material please check also:
http://www.amibroker.com/support.html

*********************************




Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___