| / | Forum |
|
stockwet
2006.07.26 17:52
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 |
|
Environment MQL4 is based on the conception of safe "sandbox": reading and saving files using the language are allowed in some predefined folders only. This protects the user of MetaTrader 4 from the potential danger of damaging important data on the HDD. However, it is sometimes necessary to leave that safe area. This article is devoted to the problem of how to do it easily and correctly. |
5198 |
stringo
2006.07.26 18:42
#property show_inputs |
|
stockwet
2006.07.26 19:11
Cool. Thanks.
stringo wrote: #property show_inputs |
|
stockwet
2006.07.26 19:15
stringo wrote: 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.#property show_inputs |
5198 |
stringo
2006.07.26 19:39
No. this is impossible. |