Passing Vars to Scripts

 
I'm playing around with scripts and realize that they don't have the ability to set external variables. Is there a way to pass a variable into a script either manually or via another indicator on the chart?

Here's what I'd like to do. I want to identify an upper and lower channel on the chart. I'd like to manually execute the script so that it looks at the price values of the two channel lines, runs a calculation, and places a buy and sell stop order. I have the trading functions working, but, I'm not sure how to grab user defined variables for the script to use. Any ideas?

stockwet
 

#property show_inputs

 
Cool. Thanks.

stringo:

#property show_inputs

 
stringo:

#property show_inputs

I have a related, but different question. Is there a way I can dynamically pre-populate an extern var? For instance, I'd like to have an extern var initially set to Price + 15 pips, then I can manually change it. Is this possible? I've tried declaring a var in the init block, but, I get "initialization expected" when I compile.
 

No. this is impossible.

Initialization starts after input variables are set via property sheet

Reason: