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) ;