作业帮 > 英语 > 作业

英语翻译Advanced Tip:“Working with Series Arrays”As a memory opt

来源:学生作业帮 编辑:作业帮 分类:英语作业 时间:2024/11/05 05:14:57
英语翻译
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来获得更多的内容。 英语比较差,有错误的地方请勿怪,谢谢。