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 P
ane
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
P
ane
n=Foreign("~parameters","Close");
n=LastValue(n);
Plot(ADX(n), "ADX pds: " +n, colorred) ;
2. Using Static Variables (passing
variable):
//Main
P
ane
n = Param( "pds", 1, 1, 100, 1 );
StaticVarSet("parameters",n);
Plot(C, Date()+"",
colorblack
,ParamStyle("Style") | GetPriceStyle()) ;
Title="ADX pds: " +n;
// Linked
P
ane
n=StaticVarGet("parameters");
Plot(ADX(n), "ADX pds: " +n, colorRed) ;