Function Input/Output Parameters

有關於TS使用、泛Easy Language策略撰寫、績效評估等疑難雜症,都可在此討論。

Function Input/Output Parameters

文章89578251 發表於 2010年 7月 28日, 21:46

Usage Example (function named "MyBands"):

Inputs: oUpperBand (NumericRef), oLowerBand (NumericRef);
oUpperBand = Highest (High, 10) [1];
oLowerBand = Lowest (Low, 10) [1];
MyBands = 1;

Questions: 1.1 Why oUpperBand and oLowerBand can be both the input (defined as Inputs) and output (put on the left side of the "=")? 1.2 Why we want to do so? I mean the functionality. 3. Why set MyBands = 1? What is it used for? Could I set MyBands to equal to any numeric value? 4. It's said MyBands is a function, but why it is a function and it isn't a variable? 5. How MyBands is correlated to oUpperBand and oLowerBand?

Calling a Multi-Output Function

Usage Example:

Vars: oUpperBand (0), oLowerBand (0);
Value1 = MyBands (oUpperBand, oLowerBand);
Plot1(oUpperBand);
Plot2(oLowerBand);

Questions: 2.1 Why here we can use Variables oUpperBand and oLowerBand as inputs in the Function MyBands? 2.2 Where we can get the values of the Variables oUpperBand and oLowerBand? They aren't assigned to any function or calculation. 2.3 What is it used for assigning MyBands (oUpperBand, oLowerBand) to Value1?
89578251
 
文章: 5
註冊時間: 2010年 6月 2日, 07:19

回到 Tradestation與Multi-Chart交易平台

誰在線上

正在瀏覽這個版面的使用者:沒有註冊會員 和 1 位訪客