{******************* ******************** ******************** ********
Name: TS.MATLAB.Entropy
Analysis Type: Indicator
Description: An example of using Matlab into Tradeststion
Used: TS.MATLAB.LINK.dll
Provided By: Trade Smart Research (c) Copyright 2001 - 2005
www.tsresearch.com
******************** ******************** ******************** *******}
Input: Length(500), q(1);
{create array x and add new value}
if currentbar = 1 then begin
Value1 = TS.MATLAB.LINK("x = ["+ NumToStr(C,4)+" ]");
end else begin
{add next value to array}
Value1=TS.MATLAB.LIN K("x=[x "+ NumToStr(C,4) +" ]");
if currentbar > Length then
{if array > our periods (length) then delete first element from array}
Value1=TS.MATLAB.LIN K("x(1)=[]");
{calculating TSentropy.m function}
Value1=TS.MATLAB.LIN K("TSentropy(x,"+Num ToStr(q,2)+")");
end;
Plot1(value1, "Entropy");
{***** Copyright (c) 2001-2005 Trade Smart Research, Ltd. All rights reserved.
www.tsresearchgroup.com *****
***** Trade Smart Research reserves the right to modify or overwrite this analysis technique
with each release. *****}
Bookmarks