{******************************************************************* Name: TS.Link.QuoteFields Analysis Type: Indicator Description : Example Indicator for TS Link DLL Used: tslink.dll Provided By : Trade Smart Research (c) Copyright 2001 - 2005 www.tsresearchgroup.com ********************************************************************} Inputs: SetSheet(1), SetBeginRow(1), SetColum(2), ExcelFileName("TSLinkExample.xls"), ExcelFilePath("C:\Program Files\TradeSmart\TS Link\TSLinkExample.xls"); Var: StartValue(0), SetValue(0), SetSymbolName(""), SetAsk(0), SetAskSize(0), SetBid(0), SetBidSize(0), SetLast(0), SetTradeVolume(0), SetTimeLastTrade(0) ; SetSymbolName = SymbolName; SetAsk = q_Ask; SetAskSize = q_AskSize; SetBid = q_Bid; SetBidSize = q_BidSize; SetLast = q_Last; SetTradeVolume = q_TradeVolume; SetTimeLastTrade = q_TimeLastTrade; {Declaration functions} defineDLLFunc: "tslink.dll", int, "TS_StartExcel",LPSTR,LPSTR; {initalisation excel file 1 - Short BookName, 2 - full path bookname} defineDLLFunc: "tslink.dll", int, "TS_SetValue",float,int,int,int,int; {value,sheet number, row, column, spleep milisekonds} defineDLLFunc: "tslink.dll", int, "TS_SetString",lpstr,int,int,int,int; {text,sheet number, row, column, spleep milisekonds} if currentbar = 1 then begin StartValue = TS_StartExcel(ExcelFileName,ExcelFilePath); end; {Call Dll and send to it of the value OHLCV} If LastBarOnchart Then begin SetValue = TS_SetString(SetSymbolName,SetSheet,SetBeginRow,SetColum,10); SetValue = TS_SetValue(SetAsk,SetSheet,SetBeginRow+1,SetColum,10); {10 miliseconds sleep} SetValue = TS_SetValue(SetAskSize,SetSheet,SetBeginRow+2,SetColum,10); SetValue = TS_SetValue(SetBid,SetSheet,SetBeginRow+3,SetColum,10); SetValue = TS_SetValue(SetBidSize,SetSheet,SetBeginRow+4,SetColum,10); SetValue = TS_SetValue(SetLast,SetSheet,SetBeginRow+5,SetColum,10); SetValue = TS_SetValue(SetTradeVolume,SetSheet,SetBeginRow+6,SetColum,10); SetValue = TS_SetValue(SetTimeLastTrade,SetSheet,SetBeginRow+7,SetColum,10); End; Plot1((SetAsk+SetBid)*0.5, "Middle"); {***** 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. *****}
|