EZ language 架構
Input和Variable的差別當一個Function要參考外部的資料時Input:外部輸入的資料(不可變動)Variable:運算結果的資料(可變動的結果)
InputInput有分Series和Simple,而分別宣告的方式如:     (我們也推測當宣告的時候如果後面的預設值不是輸入Series或Simple,則它應該會直接依照其形態判斷其宣各是否為陣列)Inputs: Price(NumericSeries), Length(NumerSimple);
Variable:TS2000i裡所有的變數都是宣告陣列的方式在進行。TS2000i每宣告一個變數就切割一個乘上你資料天數為個數的陣列。Variableinput:FastDay(6),SlowDay(12);   variable: RSI_F(0),RSI_S(0);   if fastday<slowday then begin   RSI_F = RSI(close , FastDay);   RSI_S = RSI(close , SlowDay);   end;   if RSI_F cross over RSI_S and RSI_s[1] < 50 then   buy next bar at market;   if RSI_F cross under RSI_S and RSI_s[1] > 50 thenexitlong next bar at market;   if RSI_F cross over RSI_S and RSI_s[1] < 50 thenexitshort next bar at market;   if RSI_F cross under RSI_S and RSI_s[1] > 50 then   sell next bar at market;我們懷疑RSI_s[1]的第二個S應該是大寫宣告時並無特別說明Variable是否為時間序列資料,但是使用時就直接將它當成時間序列所以我們推論Variable是以陣列的方式宣告EasyLanguage price data valuea type of array, where the element number refers to the “number of bars ago.”Ex : Close and Volume
PlotPlot:畫技術指標畫技術分析的輔助線               {把計算結果的MACD再做一條它的9天平均}Plot1(MACD(Close, FastMA, SlowMA), "MACD");Plot2(XAverage(MACD(Close, FastMA, SlowMA), MacdMA), "MACDAvg");Plot2(XAverage(Plot1, MacdMA), "MACDAvg");
Plot續Plot存的應該是一串時間序列的值,每個值代表一個對應的(time,y)的點,而畫出的線應該是由這些點所組成,中間的線段由程式判斷自動連起來。
Ez1 ver1.0

Ez1 ver1.0