英語翻譯Advanced Tip:「Working with Series Arrays」As a memory opt

題目:

英語翻譯
Advanced Tip:「Working with Series Arrays」
As a memory optimization,EasyLanguage automatically determines if a prior value
of any element of an array is accessed at any point in the trading strategy,analysis
technique,or function,and then,if required,stores the historical values for the array.
EasyLanguage stores only as much history as it needs to fulfill the MaxBarsBack
setting.For example:
Value1 = MyArray[5][10] * 1.05;
Value2 = MyOtherArray[6] - Value1 ;
Plot1( Value2 );
The indicator stores all the prior values of MyArray,given that a historical value of
the array is referenced in the first line.The variable Value2 and MyOtherArray are
both simple,thus historical values for this variable and array are not stored.
In other words,arrays can be either series or simple structures.This is important
when you want to access the values of array elements from third-party languages
through DLLs because depending on the state of the array,there will be more or less
historical data stored than you require.In this scenario,you can force an array to be
a series array by referencing a previous value of an element in the array in your
trading strategy,analysis technique,or function (i.e.,by using a 『dummy』 statement).
Or,you may want to consider working with functions; you can force a function to be
a series function.Refer to the next section in this chapter titled,「Understanding User
Functions」 on page 44 for more information.

解答:

we need bonus
再問: 你要多少阿。。
再答: 多少給一點啦
再答: 高級技巧:使用序列數組 作爲一個內存優化,在交換策略、分析技術或者函數中,易語言會判斷是否一個數組中的占優先的任意element能夠訪問任意指針,那麼,如果被要求的話,爲這個數列存儲歷史值。易語言只存儲需要存儲的歷史值個數以便滿足MaxBarsBack的要求,例如: Value1 = MyArray[5][10] * 1.05; Value2 = MyOtherArray[6] - Value1 ; Plot1( Value2 ); 指示器存儲了所有優先值到數組MyArray中,假定這個數組的一個歷史值是參考第一行的。變量value2 和 MyOtherArray比較簡單,對於這個變量和數組的歷史值不需要被存儲。簡而言之,數組可以是一個序列或者是一個簡單的結構,當你要通過dll從第三方語言來訪問數組的元素時這點是非常重要的,因爲訪問要依賴於數組的狀態,這樣可能會有一些歷史數據被非法存儲。在這樣的場景,在交換策略、分析技術或者函數中,通過參考之前的一個數列中的元素,你可以強制你的數組爲序列數組(例如:採用dummy申明)。或者你也可以使用函數,你可以強迫使用序列函數來實現此功能,請參考下一部分,章節名稱爲:「理解用戶函數」,頁碼爲44來獲得更多的內容。 英語比較差,有錯誤的地方請勿怪,謝謝。

添加新評論

暱稱
郵箱
網站